commit 9e3609695345bc32a99cf12e17150a4f0aab2802 Author: Polonkai Gergely Date: Sat Mar 3 21:35:30 2012 +0100 Added CircleMUD 3.1 as initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9eb0607 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +config.log +config.cache +config.status diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..a57065e --- /dev/null +++ b/ChangeLog @@ -0,0 +1,4253 @@ +Release history: + +Version 3.1 (yes, no beta pl): November 18, 2002 +Version 3.00 beta pl22 release: October 4, 2002 +Version 3.00 beta pl21 release: April 15, 2002 +Version 3.00 beta pl20 release: January 15, 2002 +Version 3.00 beta pl19 release: August 14, 2001 +Version 3.00 beta pl18 release: March 18, 2001 +Version 3.00 beta pl17 release: January 23, 2000 +Version 3.00 beta pl16 release: August 30, 1999 +Version 3.00 beta pl15 release: March 16, 1999 +Version 3.00 beta pl14 release: July 3, 1998 +Version 3.00 beta pl13a release: June 4, 1998 +Version 3.00 beta pl13 release: June 1, 1998 +Version 3.00 beta pl12 release: October 29, 1997 +Version 3.00 beta pl11 release: April 14, 1996 +Version 3.00 beta pl10 release: March 11, 1996 +Version 3.00 beta pl9 release: February 6, 1996 +Version 3.00 beta pl8 release: May 23, 1995 +Version 3.00 beta pl7 release: March 9, 1995 +Version 3.00 beta pl6 release: March 6, 1995 +Version 3.00 beta pl5 release: February 23, 1995 +Version 3.00 beta pl4 release: September 28, 1994 +Version 3.00 beta pl1-3, internal releases for beta-testers. +Version 3.00 alpha: Ran on net for testing. Code not released. +Version 2.20 release: November 17, 1993 +Version 2.11 release: September 19, 1993 +Version 2.10 release: September 1, 1993 +Version 2.02 release: Late August 1993 +Version 2.01 release: Early August 1993 +Version 2.00 release: July 16, 1993 (Initial public release) + + + +Legend +------ +JE = Jeremy Elson (jelson@circlemud.org) Since Jul 16, 1993 +AE = Alex Fletcher (furry@circlemud.org) Since Feb 23, 1995 +GG = George Greer (greerga@circlemud.org) Since Oct 14, 1997 +DK = Daniel A. Koepke (dkoepke@circlemud.org) Since Jul 11, 1999 + + New applicants must have a last name alphabetically after +'Koepke' and will only be accepted on December 2, 2001. + +--- CircleMUD 3.0 patchlevel 3 + +8/31/94 JE Added a GET_REAL_LEVEL macro which returns the actual + level taking switched characters into account. Used + in CAN_SEE so that switched immorts can't see invis + gods. + +8/31/94 JE Added restriction to interpreter.c so that immort commands + cannot be used by NPCs. Removed all the IS_NPC checks from + the individual god commands since they are now redundant. + +8/31/94 JE Made newsign.c into sign.c and deleted the old DIKU sign.c. + newsign.c forks to handle its kids and is generally more + concise and robust. + +8/31/94 JE Changed the type argument of affect_from_char and + affected_by_spell to sh_int (from char) to match the fact + that the 'type' member of the affected_type structure is + now a sh_int instead of a char. Spotted by Jean-Jack + Riethoven. + +8/31/94 JE Fixed MIN statement using uninitialized 'water' var in + spell_create_water. Spotted by JJR. + +8/31/94 JE Ken Cavness noted that MOBs were getting past guildguards. + Not surprising, since I changed the relationship between + do_move/do_simple_move/perform_move so many times. The + discipline has now changed again; MOBs calling perform_move + must call with 3rd arg of 1 instead of 0. Changed the + arg from 'following' to 'need_specials_check' so its purpose + would be clearer. + +8/31/94 JE Added 'worn_on' short integer to obj_data structure to go + with worn_by char_data pointer. Indicates which eq pos + eq is being worn on. (Will be used to facilitate a cleaner + version of objectmagic.) + +8/31/94 JE extract_obj now automatically unequips the obj first if it + is being used as equipment (uses worn_by and the new worn_on). + do_use no longer unequips. objectmagic didn't have to be + changed since extract_obj automatically does the work now. :) + +8/31/94 JE Fixed cityguard routine with a CAN_SEE check so that blinded + guards no longer banzai people, and so that guards don't + banzai invis people etc. Spotted by Ken Cavness. + +8/31/94 JE Fixed do_reply to make sure the person you're replying to + is still in the game before calling perform_tell. Note, I + think it still may be possible for your reply to go to + someone else if the recipient logs out and someone else logs + in. In particular, this will break in a big way if I ever + implement some scheme where it keeps a pool of char_data + structures for reuse. + +8/31/94 JE CHA added to display when rerolling a character. + +8/31/94 JE Changed TOUNGE to TONGUE throughout. + +8/31/94 JE Made the '*' (ignore) case in zone reset tables (used for + invalid vnums) set last_cmd = 0 for proper resetting. + +8/31/94 JE Enhanced (added?) NeXT compatibility with FOPEN_MAX, my_signal, + and O_NDELAY. + +8/31/94 JE Changed boards back to listing lowest to highest since people + seemed to hate it the other way. + +8/31/94 JE Added sanity checks to perform_move since king_welmar seems + to cause crashes when he's moving on occasion, and I'd rather + remove that area than try to debug it. + +8/31/94 JE Changed 'SEC' to 'RL_SEC' in structs.h to avoid conflicts + with many OS's #defines of SEC + +9/1/94 JE Good God, is it September already? + +9/1/94 JE Changed list_skills to accumulate in a buffer instead of + using send_to_char, and use page_string. This system really + sucks. There should be a "page_to_char" command, or something. + It shouldn't even require too much conceptual difference now + that output buffers are limited! + +9/1/94 JE Added a 'sort_spells()' function and changed list_skills + to use sorted spell list instead of arbitrarily ordered list. + sort_spells() called once on boot from db.c. + +9/1/94 JE Finally finished making the background story paged. Now that + process_input and command_interpreter, etc., have been + rewritten, all it took was changing it from SEND_TO_Q to + page_string. Whoo hoo! + +9/1/94 JE Jeff Fink suggested having perform_act do some run-time + sanity checking in order to make it more robust. Thus, + I created the CHECK_NULL macro for it in comm.c. + +9/1/94 JE Made mobs hit you if you try to cast an offensive spell + at them and fail. + +9/1/94 JE Completed line-by-line zone-parsing routines. Instead of + using scanf() to read from disk, Circle now uses fgets(). + This allows MUCH more robustness, more accurate and sensitive + error-checking of zone files, both at boot-time and run-time. + In addition, the error reporting now gives you a specific + _line number_ in the zone file of the error. :) + +9/2/94 JE Made a 'qecho' command, combined with qsay in do_qcomm + of act.comm.c. + +9/2/94 JE Updated the README file. + +9/2/94 JE Circle 3.00 beta patchlevel 3 released + + +-- Patchlevel 4 + + +9/9/94 JE Added IS_NPC check to do_score to prevent crashes. + +9/9/94 JE Added #undef MAX and MIN for NeXT compatibility. + +9/19/94 JE Started work again after 10 days of real life (school's + starting up again, ya know.) + +9/19/94 JE Changed lantern-handling in update_char_objects in handler.c; + now gives warning one tick before the light expires (idea + from Chris ) and correctly + decrements world[ch->in_room].light as it should have from + the very beginning. + +9/19/94 JE Changed the build_house parser in house.c to allow for + a house which has more than one exit (i.e., only one of + which is access-controlled) because people seem to want + multi-room access-controlled areas. + +9/19/94 JE Fixed multi-room-shared-atrium bug in house_control_house, + house.c (I haven't heard of this bug ever manifesting itself + but looking at the code I realized the error.) + + +9/19/94 JE Changed 'long' to 'time_t' where appropriate. + +9/19/94 JE Added graceful handling of missing playerfile in db.c + + +-- Patchlevel 5 + +10/4/94 JE ban.c:98: long int format, time_t arg, fixed with cast + +10/4/94 JE Made default action of hcontrol to be a help screen; + added 'show' subcommand. + +10/4/94 JE Added reni's NeXT function prototypes to utils.h + +10/5/94 JE Fixed !IS_NPC in do_score (act.informative.c) + +10/9/94 JE Added charisma-to-25 code to do_restore (act.wizard.c) + +-- Sanity break + +2/20/95 JE Added max length check to set_title in limits.c -- all + title setting should go through this function + +2/22/95 JE Added check for null name in 'show player' + +2/22/95 JE included unistd.h in house.c, boards.c and objsave.c + for unlink prototype + +2/22/95 JE Low-lev imms can no longer see invstart people above their + level entering game + +2/22/95 JE Changed 'color' and 'syslog' to show current levels if typed + without arguments, instead of help text. + +2/22/95 JE fixed castle by adding terminator to end of move string + reported by Ed Mackey (emackey@BIX.com) + +2/22/95 JE If you try to return to your original body, and someone else + has connected into it, disconnect them. act.wizard.c, + do_return(). + reported by Aaron Mills + +2/22/95 JE interpreter.c - changed the code to sense if a switched + persona of yourself is connected when you log in. Should + make switch more stable. + reported by Aaron Mills + +2/22/95 JE new timediff in comm.c to work on systems for which + tv_sec and tv_usec are unsigned + reported by Steven Serocki + +2/22/95 JE change RLIMIT code for systems that don't have RLIMIT_INFINITY + reported by Steven Serocki + +2/22/95 JE changed title_type[4][35] to [NUM_CLASSES][LVL_IMPL + 1] + throughout + reported by Darel Cullen + +2/22/95 JE changed "his arm" to "$s arm" in act.obj.c + reported by Chris Epler + +2/22/95 JE act.other.c, do_quit() -- kill off all sockets connected to + the same player as the one who is trying to quit. Helps to + maintain sanity as well as prevent duping. + duping reported by Chris Epler + +2/22/95 JE installed new version of Jeff Fink's shop.c code + +2/22/95 JE Patched bug in Jeff Fink's shop code reported by him. + Patch sent by Jeff Fink + +2/22/95 JE created player_specials structure for new players coming in + after having been deleted. Yet another example of a bug that + could have been avoided completely if we'd been using C++. + Reported by Jeff Fink + +2/22/95 JE Added code to support 'R' command in zone resets (remove + obj from room). Code sent by Jeff Fink. + +2/22/95 JE Changed plain 'stat' to make better assumptions about what + you're trying to stat. + Code sent by Jeff Fink + +2/22/95 JE Added go_gen_door code written by Jeff Fink to eliminate + duplication of checks, etc. for open/close/lock/unlock/pick + +2/22/95 JE Fixed shop code -- changed keeper = 0 to keeper = me + +2/22/95 JE Added magic_alter_objs code submitted by Jeff Fink + +2/22/95 JE Added break statement to mag_damage, energy drain + Spotted by Jeff Fink + +2/22/95 JE Added ASCII flag system to db.c for world, obj, mob files + +2/22/95 JE Brought in the new 3.0 world files from Furry + +2/23/95 JE Created 'random.c' as Circle's new, portable random number + generator. + +2/23/95 JE Added 'POSIX_NONBLOCK_BROKEN' option to work around OSs + such as AIX which don't implement POSIX nonblocking I/O + correctly, causing the MUD to hang in places such as the + Password: prompt. + +2/23/95 JE Added a case for SGI (IRIX) in utils.h OS-specific header + section for cleaner compiles + + +-- Patchlevel 6 + +2/24/95 JE Fixed asciiflag_conv in db.c for uppercase flags (typo, + 'a' instead of 'A'). + +2/24/95 JE Added max_bad_pws to config.c. + +2/24/95 JE (logged retroactively) Added max_filesize to config.c to + set max limit on size of bug, typo and idea files to prevent + bombing + +2/24/95 JE Moved 'pfilepos' from descriptor_data to char_data where is + belongs. More logical, plus fixes the switch-into-a-PC-and + save bug reported on rec.games.mud.diku by + shruew@amiserv.xnet.com (Johnny Mnemonic). + +2/24/95 JE Similarly moved password from descriptor to character. + +2/24/95 JE Changed nonblock to OR-in O_NONBLOCK to the current flag + bitvector of descriptors instead of setting directly. + +2/24/95 JE Changed 'last_tell' (used by reply) to use player ID number + instead of a pointer to the character. Much safer because + I don't have to worry about pointer reuse, plus it'll still + work if the person you're replying to logs out and back in + again. + +2/24/95 JE Changed distribution-default of nameserver_is_slow to NO. + +2/24/95 JE Fixed src/util/showplay.c + +2/24/95 JE Added MAG_ALTER_OBJS to SPELL_INVISIBILITY in spell_parser.c + +2/25/95 JE Fixed PC/NPC checks in act.wizard.c, do_set. + Reported by Eric Green and Stefan Wasilewski + +2/25/95 JE Fixed carried-by/worn-by reporting of objects + act.wizard.c, do_stat_object. + Reported by Eric Green and Stefan Wasilewski + +2/25/95 JE Deleted 'equipment status' from do_stat_obj in act.wizard.c + --didn't seem particularly useful and took up valuable screen + space + +2/25/95 JE do_wiznet, act.wizard.c, wiznet chops off first letter of + message when levels are used. Reported by Eric Green and + Stefan Wasilewski + +2/25/95 JE do_ungroup, act.other.c, fixed so that disbanding a group + doesn't un-charm charmed mobs following you. + Reported by Eric Green and Stefan Wasilewski + +2/25/95 JE magic.c, changed so you can't sanct sancted mobs + Reported by Eric Green and Stefan Wasilewski + +2/25/95 JE Brought in fixed world files from furry and corresponding + castle.c and spec_assign.c for new specproc assignments + +2/26/95 JE Removed minor output display but on object statting, do_stat, + act.wizard.c Spotted by Eric Green. + +2/26/95 JE Added max string length checks in perform_subst(), comm.c + Reported by Eric Green and Stefan Wasilewski. Also added + comments to the function. + +2/26/95 JE Similar length checks in perform_complex_alias, interpreter.c + +2/26/95 JE Made buffers MAX_INPUT_LENGTH size to handle very large output; + tmp_name in interpreter.c, *_search in do_who and do_users + in act.informative.c + +2/26/95 JE Rewrote most of do_group, act.other.c + +2/26/95 JE do_ungroup, act.other.c - disbanding a group also ungroups + yourself. + +2/27/95 JE Added olc.c and olc.h. + +2/28/95 JE Added bank card specproc to spec_assign.c + +2/28/95 JE Updated FAQ and README-BETA + +3/3/95 JE Patchlevel 6 released + + +--- Patchlevel 7 + +3/4/95 JE Added PFILEPOS assignment in interpreter.c so deleted + characters are not replicated in plrfile. (near "Did I get + that right, X?") + +3/4/95- JE Extensive rewrite of documentation +3/7/95 + +3/8/95 JE Changed qecho to LVL_IMMORT (interpreter.c) + +3/8/95 JE Created GET_PFILEPOS macro and used it throughout. + +3/8/95 JE Changed extern declaration of thaco in fight.c from [4][35] + to [NUM_CLASSES][LVL_IMPL+1]. Spotted by Marcin Zaranski. + +3/8/95 JE Problems reported with stop_fighting called when char not + fighting. Most probably the call of stop_fighting() in + hit() when ch->in_room != vict->in_room. Added check for + FIGHTING(ch) before calling stop_fighting. Also made + stop_fighting tolerant of being called at the wrong time. + Problem spotted by Marcin Zaranski. + +3/8/95 JE Also changed stop_fighting to use REMOVE_FROM_LIST macro. + +3/9/95 JE Implemented ROOM_TUNNEL. + +3/9/95 JE Fixed a bug causing the MUD to crash under pathological + input-overflow conditions (such as someone holding down a + key for 60 seconds.) + Reported by Carl Tashian + +3/9/95 JE "set class" output corrected. + Spotted by Ryan Baker . + +3/9/95 JE Added Jeff Fink's do_gen_door patch for picking. Also + initialized obj and vict to NULL, might have been causing + double messages. + +3/9/95 JE Fixed find_door to give a better message with a null arg. + +3/9/95 JE Brought in new version of world files from Furry + Deleted that stupid '#99999' from the end of all the world + files since the new parser doesn't need them. + +3/9/95 JE Changed perform_group so "group all" doesn't group people + you can't see. + + +--- Patchlevel 8 + +5/5/95 JE Changed my email address to jelson@jhu.edu throughout. + +5/5/95 JE Implemented AFF_WATERWALK flag. + +5/5/95 JE Implemented MOB_AWARE flag (mobs that cannot be backstabbed). + +5/5/95 JE Implemented MOB_NOBASH flag. + +5/5/95 JE db.c, added support for type E (Enhanced) mobs + +5/5/95 JE Implemented ROOM_PEACEFUL flag (rooms in which fighting + is not permitted.) + +5/5/95 JE Implemented ROOM_NOTRACK flag. + +5/5/95 JE Implemented AFF_NOTRACK. + +5/5/95 JE Added some sanity checking to obj_to_obj. + +5/5/95 JE Neatened up the saving throw table in magic.c. + +5/10/95 JE Implemented bless and curse spells for objects. + Code submitted by Jeff Fink. + +5/10/95 JE Implemented poisoned objects and remove-poison for objs. + Code submitted by Jeff Fink. + +5/10/95 JE Implemented MOB_NOCHARM flag. + +5/17/95 JE Completely new building.doc world builders' documentation. + +5/20/95 JE Imported latest version of Furry's world files + +5/21/95 JE handler.c, extract_char()... if a char is extracted and + has no descriptor associated with it, free the char. + Prevents a memory leak if players get purged. + Suggested by Eric Green. + +5/21/95 JE Set mob's default charisma to 11. + Spotted by Jeff Fink. + +5/21/95 JE Changed obj num loaded for 'create food' to 10, waybread. + +5/21/95 JE Removed strange code from db.c, reset_zone, 'O' command, + that seemed to prevent two objs of the same vnum from being + loaded in the same room. + Suggested by Jeff Fink. + +5/21/95 JE handler.c, affect_join() - fixed bug preventing spells + with multiple effects from coexisting. + First reported by Thomas Katzlberger. + +5/21/95 JE boards.c - changed board so it will respond to 'examine' + as well as 'look' + Suggested by Chris Epler. + +5/21/95 JE Initialized GET_LAST_TELL to NOBODY. + Spotted by Eric Green and Stefan Wasilewski + +5/21/95 JE Changed around wiz-invisibility for better compatibility with + the 'visible' command, and to give better messages. + Suggested by Chris Epler. + +5/21/95 JE Fixed mag_groups so caster is only hit once per cast. + Spotted by dodger@WPI.EDU (DoDGeR) + +5/21/95 JE Fixed the bug causing crashes on some systems if an + incorrect class is entered when a new character is created. + For the record I think this was happening on architectures + on which the 'char' type is defined as being unsigned. + +5/21/95 JE Made is_abbrev asymmetrical as it should be; fixes + "look ingerwal" as being interpreted as "look in" + Reported by Mike Higuchi and others. + +5/21/95 JE Changed spells_to_learn from byte to int; used one of the + spares in the playerfile so that people already running + MUDs with 3.0 won't get screwed (grrrrr....). + Spotted by Marcin + +5/21/95 JE spell_parser.c, say_spell() - target of spell now only + sees caster casting if they're in the room together. + Spotted by Marcin + +5/21/95 JE Also changed say_spell so that object messages will be + correctly reported if target obj is in caster's inventory + as well as in same room. + +5/21/95 JE Changed mag_alter_objs to give the room a message as well + as the caster. + +5/21/95 JE handler.c, char_from_room(), changed so that if char is + fighting when removed from room, stop_fighting is called + immediately to stop the fight. + Problem found by Marcin + +5/21/95 JE Corrected errors with RUSAGE section in comm.c. + Spotted by Thomas Knight + +5/21/95 JE Fixed the ancient "pour canteen out" bug -- the problem + was that any drink container whose weight was less than + its quantity could go negative since the MUD assumes that + all drinks weigh one pound per unit of drink. parse_room, + db.c, now checks drink containers and fountains to make + sure that weight is greater than quantity. + +5/21/95 JE Fixed the cleaning woman in Welmar's castle so that she + only picks up trash. + Fix submitted by Christopher Dickey + +5/21/95 JE Fixed up show_string so that the display works properly; + fix submitted by Michael Buselli + +5/21/95 JE Player killers' damage no longer set to 0 if they're inflicting + damage on themselves. + Reported by Julian Fong. + +5/21/95 JE Fixed do_gen_door to correctly sense when no arg is given. + Problem spotted by Eric Green + +5/21/95 JE *** WAIT_STATE set for all uses of magic items *** + Suggested by Eric Green + +5/21/95 JE Found irrefutable clues & figured out who shot Mr. Burns. + +5/21/95 JE Bug in mobact.c prevented alignment-aggressive monsters from + working if they were set not in conjunction with the normal + AGGRESSIVE bit. + Problem spotted by Chris Epler + +5/21/95 JE Problem with HELPER mobs getting extra hits fixed. + Problem spotted by Chris Epler + +5/22/95 JE Created the CircleMUD License. Changed Makefile so that + the license is displayed the first time the MUD is compiled. + Sorry if this is a dickish thing to do, but it's a Derek + Snyder countermeasure. + +5/22/95 JE Added logging for whole-world-resets using zreset command. + +5/22/95 JE fight.c, hit() -- Changed declaration of all intermediate + vars used to calculate hitroll and damroll to be int to + avoid problems with unsigned bytes on certain architectures. + Same change to 'percent' vars in act.offensive.c. + Suggested by Al Thompson + +5/22/95 JE Rewrote mag_affects in magic.c to be more readable and easier + to use, as well as correcting some old bugs (i.e., being able + to un-affect mobs by re-affecting them and then waiting for + the affect to fade.) + +5/22/95 JE fight.c, damage() - WIMPY mobs do not flee if they are + damaging themselves. + +5/22/95 JE comm.c, close_socket(). When a player loses link, all + players with same idnum are also disconnected. Fixes a + duping bug. + Found by Clay Hardin + +5/22/95 JE Added "NOEFFECT" char constant to config.c. + +5/22/95 JE Fixed bug in zone-reset 'R' command where second arg was + being resolved as a room vnum instead of an obj vnum. + Fix sent in by BUG. + +5/22/95 JE Added two prototypes to comm.h so that comm.c will compile + cleanly under Ultrix. + +5/22/95 JE spell_parser.c, cast_spell() - prevents ungrouped chars from + casting MAG_GROUPS classes of spells (returns error msg and + does not take mana). + +5/22/95 JE Added the GET_EQ macro for character equipment and SECT + macro for sector types; changed code throughout to use + the new macros. + +5/22/95 JE act.movement.c, has_boat - added has_boat function so that + unwearable boats in inventory and boats worn will work as + boats. + +5/22/95 JE Added sun386 (SunOS 4.0.x) compatibility by defining + sigaction as signal for it. + Patch sent by Tim Aldric. + +5/22/95 JE Implemented detect poison as a manual spell. + +5/22/95 JE Fixed up mag_areas (generally) and earthquake (specifically). + +5/22/95 JE Changed 'invis' command so it will not work on mobs. + Bug spotted by v932459@si.hhs.nl. + +5/23/95 JE Fixed get_char_room_vis so that you can no longer access + PC's throughout the world with the '.' syntax. (Oops..) + +5/23/95 JE Changed GET_POS==FIGHTING check to if(FIGHTING) in + cityguard specproc, spec_procs.c + Bug spotted & fix submitted by Jason Fischer + +5/23/95 JE fight.c, perform_violence() - Implemented wait states for + mobs, so that mobs who are bashed etc. are actually taken out + of the violence for some number of rounds (depending on the + skill), like it is supposed to be. + +5/23/95 JE limits.c, gain_exp*(), changed level message so you aren't + spammed if you gain more than one level at once. + +5/23/95 JE Added bash as a level 12 warrior skill. + If successful, your opponent loses 1 round. + If unsuccessful, you lose 2 rounds of combat. + You cannot try to bash again for 2 rounds. + +5/23/95 JE Fully implemented the bash-class of skills; i.e., for skills + where it tells you you fall on your ass and have to stand up + again, you actually lose the rounds of combat while you're + still sitting. + +5/23/95 JE Brought in new lib/misc/messages file from Furry with some + additional attack types. + +5/23/95 JE Wrote the E-Spec parser and brought in Furry's world files + that use E-Specs. + +5/23/95 JE Fixed all the utilities, including autowiz which now works + again. + +5/23/95 JE Took out the scheck utility and replaced it with the -c + option on the server (Check syntax only - do not run game). + Another fantastic idea from Gekke Eekhoorn, the source of many + fantastic ideas. + +5/23/95 JE Deleted some extraneous lines from the Makefile (rules for + compiling utilities that no longer exist). + Found by Jared McDonald + +5/23/95 JE Released patchlevel 8. + + +--- Patchlevel 9 + +(No dates on this patchlevel... sorry!) +-- Made Circle self-configuring using the GNU 'autoconf' package; created + new header files conf.h and sysdep.h. Most standard library files are + now conditionally included from sysdep.h and have been removed from the + .c files. -lsocket/-lnsl libraries are automatically used if needed. + Circle's built-in 'random' function is used only if there is no random() + on the system.. many other autoconfigured aspects as well. + +-- Rewrote much of the code for the login/load sequence to prevent duping. + Duping should hopefully be impossible now. Fixed the dumb bug that allowed + people to cut off players by logging in and out without a password. + +-- Added 20 second limit to entering a password before you're cut off. + +-- Fixed the braindead way LOADROOM works. Syntax is now simply "set ras + loadroom " or "set ras loadroom off". Loadroom now properly set + when someone quits out of their house, so they go back there by default. + +-- Truncate message board titles to 80 characters or less - fixes a crash + bug. + +-- Changed tunnels so that they are "full" only if filled with a PC, not + just any char. + +-- Redid the code for setting the minimum levels classes need to be before + they can use spells and skills, and moved it to class.c. It's now *much* + easier to add new classes--- stupidly, under the old system, every time + you added a new class all of the existing spello() calls had to be + changed! See class.c to see how spell-level setting is done now. + +-- Fixed the bug which popped up in systems such as FreeBSD which incorrectly + reported the number of available file descriptors if the number was + unlimited (RLIM_INFINITY). + +-- Fixed a bug causing crashes if text files (motd/imotd/news/etc) are empty. + +-- FINALLY fixed the dumb bug causing the first char (implementor) to log + in to come in with all stats of 0. + +-- Changed magic.c so the number of affects a spell can have is not + arbitrarily limited to 2. + +-- Immortals can walk past guildguards. + +-- Fixed up some spells (create water works now). + +-- Added 'show houses' for Mr. Christopher Epler. :) + +-- Fixed a small error in one of the comments in boards.c describing how + to add a new board. + Found by Stefan Rensing + +******** Patchlevel 10 *************************************************** + +-- Fixed all the (dumb) definitions of str_app, int_app, etc. -- these + used to be arrays of 36 because a long time ago I stupidly thought those + arrays had to be extended to the number of levels on the MUD. They have + been correctly changed to reflect the possible attribute values of + characters (3-18 for PCs, 3-25 for NPCs and Gods). + +-- Added Michael Buselli's patches for an enhanced "more" pager that lets + you go back, forward, refresh, etc. Nice work, Michael. + +-- Made Circle compile under HP/UX with the help of Ben Denckla (required + an #ifdef for RLIM_INFINITY). Made some other fixes to get_max_descs() + in comm.c as well. I hate this function. + +-- Removed the REUSEPORT setsockopt() call from comm.c when opening the + mother connection. This never made any sense in the first place since + REUSEPORT is a UDP and not a TCP thing, plus it broke Circle under IRIX + 5.3+. + +-- Incorporated David Carver's OS/2 patches. Circle should now compile + under OS/2 more or less out of the box (instructions included). + +-- Added error checking to number() in case its called with the arguments + backwards. + +-- Added the skill_name() function to safely resolve spell numbers to + spell or skill names. Now used to stat potions, staves, etc. + +-- Fixed the but in the usage of is_abbrev in find_skill_num that prevented + spell names from being abbreviated. Reported by numerous people. + +-- Fixed a bug which prevented mag_materials() from working at all (although + it isn't used in standard Circle code, anyway.) + +-- Changed a str_cmp to isname in the FIND_OBJ_EQUIP case of generic_find() + in handler.c for better location of objects. + Sent by one of our best bugfinding teams, Eric Green and Stefan Wasilewski, + KEEP IT UP, GUYS! :-) + +-- Fixed the operation of peaceful rooms so that bash, etc, also don't work. + +-- Fixed a dumb bug where aliases (which use player_specials) were freed + *after* player_specials were freed. Reported by numerous people. + +-- Added values for movement loss for flying and underwater sector types. + +-- Bug fixed in do_set which made the PC/NPC checks not work. + +-- Changed backstab multipliers from a table to a formula to make adding + new levels easier. (Adding new levels is now trivial; you just have to + change the #defines in structs.h for the LVL_xx constants, and then + define the titles and exp required for each level in constants.c). + +-- do_stat_obj (act.wizard.c) updated to reflect building.doc (very old + bugs lurking in here) -- stat display changed to reflect real meanings + of values[0] - values[3] of objects. + +-- do_steal changed to simplify the no-psteal code (psteal simply always + fails on muds where it is not allowed). + +-- You can't wake up someone who's dying. (do_wake) + Patch sent by Lincoln Chan + +-- Message seen when a door opens from the other side fixed. (do_open) + Patch sent by Lincoln Chan + +-- All utilities ported and fixed. + +-- Some changes to Makefile template Makefile.in + +-- Help system completely rewritten to use split help files and an + 'index' file just like the world files; help files are loaded into + memory entirely instead of keeping file positions and an open file. + New copy of help files imported from Chris Epler (cepler@cambot.res.jhu.edu) + +-- Rewrote one_word() in interpreter.c (used to be modify.c) as part of the + help system rewrite. + +-- New world/ hierarchy from Furry (furry@cambot.res.jhu.edu) + +-- New 'messages' file from Furry (furry@cambot.res.jhu.edu) + +-- New 'configure' script which should detect nsl and socket libraries + more reliably. + +-- All scripts rewritten (autorun, automaint, purgeobjs, etc.) to use sh + instead of csh. They've been fixed, too (most of them were broken because + they had not been modified since the location of certain files changed). + Autorun rewrite by Stuart Lamble + +-- New FAQ by Furry (furry@cambot.res.jhu.edu) + + +******** Patchlevel 11 *************************************************** + + +-- Patches to make Circle compile under MSVC++ 4.0 under Windows 95: + Created a 'conf.h.win' to act as Windows' conf.h. Created a new + constant, CIRCLE_WINDOWS, to use for #ifdef's. Changed OS2's constant + from OS2 to CIRCLE_OS2 for consistency. + + Changes to some of the types throughout the code (e.g. changing some + int's to size_t's. + + Changed the type of all sockets from int to socket_t; sysdep.h + typedef's int as being socket_t under UNIX and SOCKET to socket_t + under Windows. + + Changes to some of the code in comm.c (with ifdef's) to account for + some of the differences between WinSock and Berkeley Sockets. + + Wrote a "fake" gettimeofday() function which is an interface to the + Win32 GetTickCount() and a WinSock-compatible nonblock(). + + Renamed 'act.obj.c' to 'act.item.c' to defeat an apparent bug in + MSVC++ that refuses to properly object files that have the word + "obj" in their name (i.e. act.obj.obj). + + Changed the boot-up procedure so that the max player calculation is + done before socket initialization (this is done so that the max can + be reduced from the MAX_PLAYERS value in comm.c if WSAStartup() tells + us we have less than that number of max sockets available. + + Created a CLOSE_SOCKET macro: under UNIX, this is #defined as + close(); under Windows, it's defined as closesocket. + + #defined log(x) as basic_mud_log(x) to prevent namespace collision + with the mathematical log() function. + +-- Various fixes to the 'configure' script: + The '-lsocket' library should hopefully be detected more reliably + (by detecting -lnsl first; some systems need -lnsl before -lsocket + will link successfully). + + The -cckr option is given to the compiler if we are not using gcc and + it is determined that your system's cc can take the -cckr argument. + + -fno-strict-prototypes given if we're using gcc (this should hopefully + alleviate the continuing headache of getting function prototypes to + work). + + Include a prototype for random and srandom if it's determined that + we're using Circle's random/srandom functions and not libc's. + + Check for the presence of arpa/telnet.h, and use our own local copy + (telnet.h is now included with the Circle distribution) if it does + not exist. + + Check for sys/types.h before including it. + + Configure recreated with GNU autoconf v2.9 (previously was 2.7). + +-- Made some fixes to the autorun script: most notably, it was not passing + command-line parameters to the MUD, meaning that you had to change the + port in config.c in order for it to be changed if you were using autorun. + This means that port-number changing now works the way it was documented + (autorun setting takes precedence over config.c). + +-- Made some changes to conf.h.os2 to reflect the new configure script and + the changing of the constant from OS2 to CIRCLE_OS2. + +-- Moved heartbeat functions out of game_loop and into their own function + which is called by game_loop (seems more logical this way to me). + +-- game_loop, comm.c: The code which controls the tick-timing was rewritten; + the timer is now much more accurate (does not drift with time), and + gracefully handles making up for lost ticks if the MUD is suspended for + more than a single tick-length (e.g. if the scheduler keeps it waiting + for a long time under heavy load). Added a 'timeadd' function to add + two timevals for use with the calculations. + +-- Added a timeout to the "What is your name?" prompt; should prevent denial + of service attacks whereby people use up all available descriptors by + repeatedly telnetting into the game and staying idle. (Though I have not + received reports of this happening, I'm sure someone has thought of it.) + +-- Fixed various typos in the code, help files, and libraries. + +-- do_advance, act.wizard.c: Does not allow someone to be advanced to the + level they already are. + +-- invalid_name, ban.c: Changed the buffer size from MAX_NAME_LENGTH to + MAX_INPUT_LENGTH; was causing crashes when very long names were given. + +-- Fixed look_in_obj, act.informative.c, to prevent crashes when looking into + fountains or cups with invalid values. + +-- Changed the semantics of top_of_helpt so that it points to the top element, + not the number of elements, in the help table (done to be consistent with + the other top_of_xxx variables). Fixed do_help in act.informative.c to + prevent crashes if "help zzzzzz" is typed. + +-- Reshuffled the position of alias freeing in free_char yet again (I think + I've finally gotten this one right). + +-- handler.c, affect_from_char(): Changed the list traversal over to the + classic method used when traversing a list and deleting items as we go + (i.e. keeping around a temp variable with hjp->next). (This bug was found + courtesy of Win95's completely unforgiving memory manager.. unlike most + UNIX memory managers, it causes crashes if you try to use memory that + was just freed.... Win95 is almost as good as Electric Fence! :-)) + +-- handler.c, extract_char(): Changed "if (ch->desc != NULL)" to + "if (!freed && ch->desc != NULL)" because ch was potentially freed in the + previous statement. (This bug was also found by Win 95...) + +-- limits.c, point_update(): gain_condition called first rather than last; + causes crashes when gain_condition() is called on a character that has just + bled to death (i.e. killed by point_update()). (This bug was also found + by Win 95...) + +-- Some similar cases of structures being used after they were freed in + shop.c fixed (found by Win95...) + +-- Fixed the pet shops so pets are no longer priced at 0 coins; pet prices + are now 300 coins times the level of the pet. + +-- spell_parser.c, get_skillname(): If the skill is -1, return UNUSED instead + of UNDEFINED (makes stat and scroll of identify output look better). + +-- Added more sanity checks to spell_parser.c (spell_level() and cast_spell()) + to prevent crashes if scrolls are created with wild spell numbers. + +-- spell_parser.c, spello() and unused_spell(): Changed to use a loop + instead of enumerating all classes; should make adding new classes easier. + +-- spells.h: Changed types of mana_{min,max,change} to int to correctly handle + spells which take large mana requirements. + +-- handler.c, generic_find(): Silly bug introduced in pl10 fixed whereby + you can't look in objects if you are equipped. + +-- mail.h: Changed a '1' to a 'sizeof(char)' in the MudMail system (caused + assertion failures on architectures where sizeof(char) != 1) + +-- utils.c, sprinttype(): Cleaned up the code. Looked silly before. + +-- Fixes to autowiz.c: Added an fflush() at the end so that wizlists are + correctly updated. Also removed some old bzero() calls that were still + lurking from the old days (modern SYSV systems don't like bzero() at all.) + Took out the SO_REUSEPORT socket option. + +-- Fixed wld2html.c: The parser code was quite old and could not handle + the 3.0 world files with ASCII bitvectors. wld2html now works correctly. + +-- Changed "++col" to "col++" in Michael Buselli's pager code (patch sent by + him). + +-- Brought in the new world files and 'messages' file from Furry (scrolls + of identify and the 'harm' spell now work) and new help files from + Chris Epler. + +-- Took out the very old bug, typo, and idea files from the standard + distribution. + + +******** Patchlevel 12 *************************************************** + +-- I changed the logic of prompt generation so that prompts are generated + as plain output, the same as all other output (e.g. using send_to_char()), + specifically so that both the regular output and the player's new prompt + can be written to the operating system using a single write() system call. + In many cases, this cuts in half the number of TCP packets generated + and received! This is a big win for slow machines and machines with + slow Internet links (e.g. a modem)! + + +To illustrate this point, I'll show typical TCP exchanges between MUD +clients and servers under pl11 vs. pl12. These exchanges were all +recorded using Van Jacobson's tcpdump tool, which can be downloaded from +ftp.ee.lbl.gov. The window advertisements have been removed from the +output to make it more readable. + +Here's a typical packet exchange between a MUD client and server under +pl11 when a player enters a command (in this case, "look"): + +16:17:35.287187 client.32877 > mudserver.4000: P 41:47(6) ack 2579 +16:17:35.333721 mudserver.4000 > client.32877: . ack 47 +16:17:35.334197 mudserver.4000 > client.32877: P 2579:3132(553) ack 47 +16:17:35.376089 client.32877 > mudserver.4000: . ack 3132 win 8760 (DF) +16:17:35.376162 mudserver.4000 > client.32877: P 3132:3134(2) ack 47 +16:17:35.426039 client.32877 > mudserver.4000: . ack 3134 + +The first packet is the 6-byte command, "look\r\n", sent from client to +server. The second packet is the server's TCP acknowledgement (ACK) of +those 6 bytes. The third packet is the 553-byte output of the command +"look" sent from server to client. The fourth packet is the client's TCP +ACK of those 553 bytes. The fifth and sixth packets are the 2-byte prompt +sent from server to client followed by the client's TCP ACK. + +Note that the second and third packets are often compressed into a single +packet, if the MUD happens to service that player before the server TCP +stack's delayed ACK timer expires. + +This is a much bigger waste of resources than you might expect; keep in +mind that each of these packets usually carry at least 40 bytes worth of +overhead, and IP packet processing is typically takes a lot of CPU time. + +Here's the same exchange under pl12: + +16:20:15.445465 client.32878 > mudserver.4000: P 29:35(6) ack 2016 +16:20:15.492610 mudserver.4000 > client.32878: . ack 35 +16:20:15.504223 mudserver.4000 > client.32878: P 2016:2571(555) ack 35 +16:20:15.549806 client.32878 > mudserver.4000: . ack 2571 + +The same exchange now requires only 4 packets instead of 6. (Or, if we +service the client before the delayed ACK timer expires, we could do it in +3 packets.) Note that the third packet is now both the 553-byte output of +"look" *and* the 2-byte prompt. This causes only a single TCP ACK from +the client, instead of two ACKs as in the previous example. + +Here's a typical round of combat under pl11: + +16:19:02.673794 mudserver.4000 > client.32875: P 4976:5067(91) ack 120 +16:19:02.717357 client.32875 > mudserver.4000: . ack 5067 +16:19:02.717409 mudserver.4000 > client.32875: P 5067:5069(2) ack 120 +16:19:02.767418 client.32875 > mudserver.4000: . ack 5069 + +The first packet is the combat message (e.g., "The beastly fido hits you +very hard.") The second packet is the client's TCP ACK of those bytes. +The third and fourth packets are the 2-byte prompt and its ACK. + +Under pl12: + +16:21:33.572363 mudserver.4000 > client.32876: P 8418:8505(87) ack 131 +16:21:33.620336 client.32876 > mudserver.4000: . ack 8505 + +Each round of combat is reported using only a single TCP packet, which in +turn elicits only a single ACK from the client. The exchange requires +only 2 packets instead of 4. If you have a large MUD, where many players +might simultaneously be in combat, the savings can be very significant. +MUDs with slow links or slow CPUs will probably benefit the most from this +change. + + +-- comm.c, and structs.h, various functions: replaced the "prompt_mode" + variable with the less obfuscated "has_prompt", which has the opposite + meaning. + +-- mobact.c:mobile_activity() - What a terrible bug!! Mob spec-procs + were never called if the mob was fighting or asleep. The mayor would + never wake up, but more importantly, mobs with special specprocs for + fighting (e.g. mobs that use magic during battle) were never getting + called. The check for FIGHTING and !AWAKE has been moved to after + the specproc calls but before the mob default actions. + Found by realm@styx.ph.msstate.edu. + +-- act.offensive.c:do_flee() - Added check to make sure you're at least in + POS_FIGHTING (not injured) to flee; necessary because wimpy calls + do_flee() directly and doesn't go through the interpreter. + +-- spells.c:spell_summon() - Changed so that a MOB_NOSUMMON flag prevents + mobs from being summoned instead of MON_NOCHARM. Found by Daniel + Burke. + +-- magic.c:mag_affects() - Changed the protection against re-affecting + affected mobs to check all possible spell affects instead of only the + first two (an oversight from when mag_affects was changed from 2 + affects to an arbitrary number). Found by Daniel Burke. + +-- shop.c, shop.h: Moved 3 arrays from shop.h to shop.c so that shop.h can be + multiply included if necessary. Suggested by Anil Mahajan. + +-- act.wizard.c:do_advance(): Changed to show the diminishment message to + the victim instead of the imp. Found by glennmc@ccsi.com. + +-- act.wizard.c:do_stat_character(): Added error checking to aff->type + array indexing to prevent crashes. Suggested by Anil Mahajan. + +-- act.offensive.c:check_killer(): Using 'murder' automatically sets your + KILLER flag (if pk is not allowed), even if you miss the first hit. + Suggested by Alex Fletcher . + +-- magic.c:mag_points(): Added update_pos to the end to correctly upgrade + (or downgrade) the position of your victim after healing. Found by + Johan Dustler. + +-- act.wizard.c:do_set(): Broke this monster into two functions, which + makes it easier to read and plugs the 'set file' memory leak. + +-- spells.c:create_water(): Only remove the name from the drink container + if it wasn't previously empty. Prevents permanent keywords from being + removed. Found by Eric Green. + +-- fight.c:group_gain(): Made the max possible exp gain when killing + a player equal to 2/3 the max_exp_loss. This prevents illegal exp + creation on pk muds. Found by Apua Cesar de Miranda Paquola + and Dirani (spharion@dcc.unicamp.br). + +-- fight.c:damage(): Cleaned up code, fixed similar bug to prevent + exp gain by bleeding to death. + + CHANGED: You no longer gain xp when you're damaging yourself. + +-- shop.h; shop.c:trade_with(): Clarified the error message given to + people attempting to sell a worthless item to a shop. Submitted by + Chris Epler . + +-- act.wizard.c, do_dc(): If you try to disconnect a God you can't see, + you are given "No such connection" to hide the presence of the God. + Suggested by Fred Herbert . + +-- act.wizard.c, do_gecho(): Added delete_doubledollar() to prevent + $$'s on gechos. Suggested by Jestyr Saaven . + +-- act.wizard.c, do_show(): Changed 'show godrooms' to traverse the world + print rooms marked GODROOM instead of printing rooms in a particular zone + number. Suggested by Jestyr Saaven . + +-- act.wizard.c, do_stat_room(): Changed to display the zone's vnum, not + rnum. Found by Jay Vanderwood + +-- Tried to use the typedefs mob_rnum, mob_vnum, room_rnum, room_vnum, + obj_rnum and obj_vnum consistently throughout the code. Don't know + if I found them all, but here's hoping... + +-- fight.c:damage() - Added die() after an "attempt to damage a corpse", + so if someone does manage to get into the POS_DEAD state, they'll + die for real. Suggested by root . + +-- ban.c:Read_Invalid_List() - Changed so that names are read with one + pass through the file instead of two. + +-- act.item.c:perform_drop_gold() - Changed hide_invis from FALSE to TRUE + on act() so room observers cannot see invis people dropping gold; changed + to be consistent with item dropping which already works this way. + Suggested by Chris Epler + +-- fight.c:damage() - Changed handling of AFF_SANCTUARY so that damage + is only cut in half if it is 2 or more (i.e. to prevent 1 from turning + into 0). Indirectly suggested by dodger@WPI.EDU (DoDGeR) who reported: + "If you bash a sanct'ed mob, you always see the failure message because + the sanct turns the damage from 1 to 0 and that tells skill_message to + print the miss message." + +-- autorun.pl: Made part of the standard distribution (Perl version of + autorun), by D. Hall of Vi'Rage Studios + +-- Updated FAQ and PORTING documents + +-- Made many changes to configure.in and regenerated 'configure' script + with most recent version of autoconf (2.12). configure now checks + which libc functions and system calls are correctly prototyped, and + only prototypes those functions that aren't. Also, it doesn't include + the malloc, nsl, socket, and crypt libraries unless those functions + are missing from libc. This solves problems that autoconf was having + with IRIX, where it would use lsocket and lnsl, unnecessarily generating + linker warnings when those libraries would shadow libc functions. On + the other hand, this will cause a problem on OS's where a dummy + crypt() is shadowed by a real crypt in libcrypt. Future releases may + check crypt() to see if it actually works. + +-- constants.c: changed experience and title tables to be functions + returning values instead of arrays, to avoid crashes when newbie imps + try to add levels by changing the LVL_xx constants without extending + the arrays appropriately. SYSERR message is generated to indicate + incorrectly set up xp tables. + +-- comm.c, various functions - Made some changes to make porting to other + platforms easier; introduced the CIRCLE_UNIX constant. + +-- db.c, various functions: tried to make the parser a bit better at + reporting error messages (and not crashing.. ugh.) + +-- Various files: replaced ">> 2" with "/ 4". I can be a real idiot + sometimes. + +-- Added preliminary Amiga support with the help of Jack Patton and + Steffen Haeuser. + +-- act.wizard.c:do_dc() and structs.h:descriptor_data -- Added a + "close_me" flag to descriptor_data that dc uses to indicate a descriptor + should be killed off; just having dc() call close_socket() crashes if + you're disconnecting the person below you in the descriptor list. + +-- The script I use to pack up Circle into a tar and zip file was changed + to add token files to all empty directories to work around buggy unzip + programs that don't bother creating empty directories. + +-- act.other.c:do_display(): Now complains about unknown arguments. + +-- act.wizard.c:do_shutdown(); db.h: Added the constants FASTBOOT_FILE, + KILLSCRIPT_FILE, and PAUSE_FILE to the header file, and used them + instead of the literals in the code. + +-- olc.c:do_olc(): Fixed the warning given by gcc. Just FYI, (for whoever + "Y"ou are), I left that warning in on purpose, sort of as a subtle + reminder that OLC is not done. However I finally decided to change it + after the 10,000th "bug report". + +-- Gave the utilities their own Makefile (Makefile.in, actually; Makefile + is generated by configure) + +******** Patchlevel 13 *************************************************** + +11/4/97 + +-- gg - magic.c: mag_summons(): Fixed animate dead and clone. + spell_parser.c:mag_assign_spells(): Added animate dead. + utils.h:IS_CORPSE(): Defined. + +-- gg - spec_assign.c:ASSIGNMOB(): Changed the redundant real_mobile() call. + +-- gg - mail.c:write_to_file(): Fixed problem where mail file would be left + open if the filepos was not a multiple of BLOCK_SIZE. + +-- gg - castle.c:assign_kings_castle(): Fixed a memory problem where we + would be writing to mob_index[-1].func if a mobile did not exist. + This is most noticeable in mini-mud mode. + +-- gg - utils.h:CAN_SEE_OBJ(): Fixed loophole where lower immortals can + 'stat' items of invisible immortals and see their name if they are + online. This also follows the line of thinking that if you can't + see the person, you can't see the objects they have either. Also + fixes doing a 'where' on objects to see if a 'someone' shows up + to detect higher level invisible immortals. Reported on the + CircleMUD mailing list. + +-- gg - interpreter.c:one_argument(): Can now handle a NULL pointer. + +-- gg - handler.c:obj_to_char()/obj_from_char(): Do not set the PLR_CRASH + flag on mobiles or they are flagged MOB_STAYZONE when given objects. + Reported on the CircleMUD mailing list. + +-- gg - mudpasswd.c/showplay.c/purgeplay.c: Abort if the pfile is a different + size than we expect, as per the main mud code. + +-- gg - act.comm.c:is_tell_ok(): Added. + act.comm.c:ACMD(do_reply)/ACMD(do_tell): Modified to use is_tell_ok() + to prevent replies while writing or to PRF_NOTELL people. + +-- gg - graph.c:ACMD(do_track): Don't bother to find_first_step() if the + player failed their track skill anyway. This avoids removing the + ROOM_BFS mark from every room and searching for the victim even if + they will not be successful later. + +-- gg - utils.c:get_line(): Set the buffer to NULL if there wasn't anything + read in. Fixes a problem reported by Andrew Helm . + +-- gg - mail.c: Changed 'return 0;' to 'return NULL;' where appropriate. + mail.c: Changed 'no_mail = 1;' to 'no_mail = TRUE;'. + +-- gg - act.movement.c:ACMD(do_move): Allow changing the position of the + movement commands. Only do this if you do not use the guildguard + special procedure or anything else with IS_MOVE() because they + will break, badly. + +-- gg - interpreter.h:IS_MOVE: Had hard coded directions, fixed. + This is still broken with regard to moving the directions around. + +-- gg - everything: Replace IS_SET macro with appropriate xxx_FLAGGED ones. + Also introduced OBJVAL/OBJWEAR/EXIT _FLAGGED macros. + +-- gg - utils.c:log()/mudlog(): Removed day of week as it is unnecessary. + +-- gg - spec_procs.c/limits.c: Changed to use IS_CORPSE(). + +-- gg - act.item.c:perform_remove(): Can no longer remove cursed equipment. + +-- gg - comm.c:main(): Initialize dummy_mob to all 0's just in case... + +11/5/97 + +-- gg - everything: Now has a customizable logging file for people using + Windows 95. The default is still to standard error, see config.c + to change it to a file. + +-- gg - config.c/limits.c: New variables, idle_time_rent, idle_max_level, + and idle_void for customizable timeout renting. Suggested by + Rasdan . + +-- gg - everything: Seek and destroy mission for << and >> where it should + logically be * and / (ie: Not doing bitvector work). + +-- gg - handler.c:affect_modify(): A suggestion for class and level added. + +-- gg - everything: Made language C++ friendly. Also adjusted 'const' + keywords in constants.c for correct linking. + +-- gg - interpreter.c: Removed old 'extern ... titles[]'. + +-- gg - class.c/magic.c:saving_throws[][][]: Moved to class.c. + +11/14/97 + +-- gg - Changed all \n\r to \r\n to abide by the telnet specification. + (Original patch by John Evans.) + +11/16/97 + +-- gg - comm.c: touch() and remove() KILLSCRIPT_FILE to prevent the + problem with many CircleMUD instances trying to run over and + over and over and over... + +11/18/96 + +-- gg - Merged in preliminary Macintosh support by Dean Takemori + (dean@uhheph.phys.hawaii.edu) + +-- gg - comm.c: A large number of the system dependent includes are + already accessible via HAVE_blah_blah defines in sysdep.h so + I have commented them out for possible removal later to make + things look much less complicated. If things break due to + this, fix the conf.h file for that OS. + +-- gg - comm.c: set_sndbuf(): Fixed undefined reference problem by + moving the #if...#endif inside the function which will + reduce to 'return 0;' if we don't need the function. + +-- gg - comm.c: process_output()/write_to_descriptor(): These + functions are really ugly. Is there a EAGAIN in Macintosh? + If not, we could #define EAGAIN to EDEADLK for Macintosh and + use the existing Unix code... + +-- gg - Forgot to include the ! history patch but I updated the + TODO list a few days ago anyway...duh. + +-- gg - class.c: Saving throws are now a function just like experience. + +-- gg - class.c: Thaco chart is now a function also. + +11/19/97 + +-- gg - interpreter.h: IS_MOVE(): Fixed, moving directions should now + theoretically be safe although not tested in practice. + +11/21/97 + +-- gg - Changed all those d->connected to STATE(d). Also removed the value + dependent hack of !d->connected in favor of STATE(d) == CON_PLAYING. + +12/18/97 + +-- gg - Changed mudlog() to simply use log() when writing to the log file. + +-- gg - Makefile: Removed /home/jelson/cxref/ from cxref path. Might I + recommend 'make cxref' simply create the listing and then a separate + 'make cxref-install' for updating the Documentation Project page? + This would be of more use to other people. :) + +-- gg - Replaced d->close_me hack with CON_DISCONNECT. + +12/27/97 + +-- gg - Merged in Borland compiler changes. + spells.c: Removed non-existent cha_app_type extern. + +-- gg - sysdep.h: New #define SLASH for directory separator. Will cause + awful looking paths ("lib"SLASH"etc"SLASH"players") but needed for + Macintoshes which use a : instead. + +-- gg - Fixed 'return; break;' pairs pointed out by kingmundi@hotmail.com + +-- gg - class.c:find_class_bitvector: Fixed a bug where the number constants + for magic user, warrior, cleric, and thief could be rearranged causing + the who/users class listing to be wrong. + +12/29/97 + +-- gg - db.c:clear_object: worn_on initialized to -1 by suggestion of + Daniel W. Burke . + +12/30/97 + +-- gg - constants.c and elsewhere: Formerly constant structures changed in + C++ modifications are now back to constant with a 'cpp_extern' + keyword which is 'extern' in C++ and '' in C. (It gives warnings.) + +-- gg - objsave.c: Fixed two implicit void * conversions to gen_receptionist. + +-- gg - comm.c: new_descriptor: 'i' changed to 'unsigned int' because of + signed warnings. + +-- gg - act.item.c: do_wear: Initialized 'where' to -1 to avoid spurious + warnings from g++. + +-- gg - mail.c: postmaster: Casted 'me' variable to avoid implicit + conversion from a void * which g++ gripes about. + +12/31/97 + +-- gg - utils.c: core_dump_unix: Function to dump a core file on UNIX platforms + but continue to run the MUD. Basic idea from Erwin S. Andreasen. + +1/4/98 + +-- gg - utils.h: GET_ROOM_VNUM: New macro to retrieve the vnum of a player + without worrying about accessing world[-1].number or messy ?: code. + We should do this for the rest of the room_data variables. + +-- gg - Added variable argument log() function and fixed up quite a few + log statements to take advantage of the new flexibility. + +-- gg - db.c mostly: Since we have a variable argument log() function now, all + those fprintf's can go away. + +-- gg - structs.h: Added new #define for CircleMUD version to make it easier + for add-on packages to be used with a variety of CircleMUD patchlevels. + +-- gg - Added lots of 'extern int top_of_world;' around to compensate for + GET_ROOM_VNUM macro doing bounds checking. + +-- gg - utils.c: number: Added message if someone uses it wrong. + +-- gg - comm.c: process_input: Fixed a minor annoyance in that using '! x' + didn't make that your new default '!' command. + +-- gg - Fixed some 'exit(0);' statements which should be 'exit(1);' + +1/5/98 + +-- gg - utils.c: Forgot to __attribute__ basic_mud_log() for type-checking. + +-- gg - sysdep.h: #ifdef for __GNUC__ to eliminate __attribute__ for those + not using gcc. + +-- gg - sysdep.h: Oops, forgot to put an argument for __attribute__... + +1/13/98 + +-- gg - structs.h: I misspelled CIRCLEMUD_VERSION...duh. + +-- gg - db.c/utils.h: Removed dummy_mob, saving 324 bytes (at least on i586). + NOTE: This will cause all sorts of evil things to happen because the + existing code assumes ch->player_specials exists. It is the most + effective method of getting rid of the mob hack though. + +-- gg - utils.h: Could have sworn I already changed IS_AFFECTED->AFF_FLAGGED... + +-- gg - limits.c: Inconsistent mob regeneration changed to take poison into + account for all cases (h/m/v). + +-- gg - limits.c/act.item.c: Mobs can no longer use GET_COND() so drink, + eat, and regeneration now avoid them. This is actually better. + +-- gg - utils.h: CAN_SEE macro fixed to not use GET_INVIS_LEVEL on mobs. + +1/14/98 + +-- gg - Fixed a bunch of warnings GCC 2.8.0 now emits with -Wall. Those + include ambiguous 'else' statements (ones that should have { or } + to distinguish) and when main() doesn't return 'int.' + +1/16/98 + +-- gg - interpreter.c/ban.c: nanny()/Valid_Name(): Fixed the long-standing + Diku bug where you could create two characters with the same name by + proceeding one step at a time in two different sessions. + +1/20/98 + +-- gg - Changed 'restrict' to 'circle_restrict' to fix some problem with + it being a reserved word for people. (No problems here...) + +-- gg - testing/: Created for projects of interest to future stock CircleMUDs + which will eventually be included and may be of interest to others. + Current project will be semaphore locking... + +1/25/98 - Denver beat Green Bay, 13-year football conference reign is over. + +-- gg - act.wizard.c: do_stat: Chris Jacobson decided that + the / and % in '/ 3600) % 60' were reversed. + +-- gg - spells.c: spell_locate_object(): Added a note that the keyword + handling is broken. Unfortunately the only way to fix it would + be to enable the passing of strings around the spell parser. + Spotted by: BOGWALDL@MALA.BC.CA. + +-- gg - Might as well document this so we can call this a feature. If you + are using a FreeBSD machine and you are using MD5 passwords then + any character with a name longer than 5 letters can log in with any + password. The solution is to either turn off MD5 passwords or + increase MAX_PWD_LENGTH to 20 (and wipe your pfile in the process). + +-- gg - act.wizard.c: do_stat(): Last logon not correctly displayed. + Noticed by Angus Mezick + +-- gg - spec_procs.c: magic_user(): Andrey Fidrya + noticed that the special procedure may target people not in the + same room. + +1/26/98 + +-- gg - structs.h: Changed CIRCLEMUD_VERSION to hex to let us (possibly) + do bitvector work on it later. + +-- gg - handler.c: unequip_char(): Log message should be 'NOWHERE when + UNequipping char', previously missing the 'UN'. Reported by + Akuma/Chris Baggett/DOOMer . + +1/28/98 + +-- gg - db.c: clear_char(): ch->nr was not being initialized but many checks + are based on mobs being 'nr > -1'. This check included PC + characters where the 'nr' was left 0. + +-- gg - comm.c: main()/sanity_check()/heartbeat(): Added function to check + every 30 seconds that a magic number planted during main() is still + at the end of the buffers buf, buf1, buf2, arg. Also has an + optional statistics toggle in the function. + +-- gg - utils.h: Should make the time related #define's configurable, at + the current time, changing those constants doesn't change the + functions that read them. (act.informative.c and utils.c) + +1/30/98 + +-- gg - structs.h: Fixed 'internel' typo. + +2/8/98 + +-- gg - comm.c:1068: warning: passing `unsigned int *' as argument 3 of + `accept(int, sockaddr *, int *)' changes signedness. This is + annoying, Linux has it unsigned, Solaris has it signed. + +-- gg - db.h: Decided the 'SLASH' idea was ugly. Now we have LIB_MISC + ("misc/"), LIB_ETC ("etc/"), and family. Note that I have only + tested this on Unix...Macintosh should work but Amiga I need + some help with. + +-- gg - utils.c: get_filename(): Removed redundant 'break;' + Needs 'db.h' now. + +2/19/98 + +-- gg - db.c: index_boot(): Fixed a bug with not closing a file. + +2/20/98 + +-- gg - mobact.c: remember(): Took John Evans' suggestion to change + the level check into a PRF_NOHASSLE check. It would be good + to identify other places this should be changed. + +-- gg - act.wizard.c/act.informative.c/spells.c/house.c/objsave.c/spec_procs.c + Fixed hopefully all of the 'sprintf(buf, "%s...", buf, ...);' + constructs that the Borland C++ compiler does not like. + +-- gg - act.comm.c: perform_tell(): We cannot get the id number of a mob + any longer so don't save it for the last tell pointer. + +-- gg - comm.c: game_loop(): d->wait no longer keeps going negative forever. + +2/24/98 + +-- gg - Fixed a bug whereby prompts and aliases crashed while switched. + +-- gg - comm.c: main(): Print the version in the boot logs. + +-- gg - utils.h: PLR_FLAGS() and MOB_FLAGS() changed to check for the correct + user. (ie: PC using PLR_FLAGS and NPC's using MOB_FLAGS). + db.c: Changed to use REAL_MOB_FLAGS() because we'll get spurious + warnings before the IS_NPC bit is actually loaded. + +-- gg - act.comm.c: do_reply(): Mobs cannot use GET_IDNUM(). + +2/25/98 + +-- gg - act.other.c: do_wimpy(): Mobs cannot use 'wimp_level' variable. + +-- gg - db.c: 'dummy_mob' reinstated, now with a compile time toggle. + +-- gg - utils.h: Removed IS_NPC checks from xxx_FLAGGED as they are done + by xxx_FLAGS now. + +2/27/98 + +-- gg - utils.h: We now check for (and gripe about) player specials. + db.c: dummy_mob now mandatory again, no crashes, and they get fixed. + db.c: Fixed SET_SKILL ; + screen.h: Mobs do not use color. + utils.h: CAN_SEE: Was using PRF_FLAGGED on mobiles. + +-- gg - spell_parser.c: Cris Jacobin pointed out + I forgot to add TAR_OBJ_EQUIP to 'remove curse'. + +-- gg - act.comm.c: do_say(): Mobs don't use PRF_FLAGGED. + +-- gg - act.wizard.c: do_purge(): Should use CON_CLOSE since there will not + be a player in the game at the time. + +-- gg - Makefile.in: utils.c should depend on db.h (LIB_TEXT, LIB_WORLD, etc + in get_filename) + +-- gg - db.h: LIB_OBJS changed to SUF_OBJS for 'suffix' since that is what it + is used as. Also created SUF_TEXT for E-Text system. + +2/28/98 + +-- gg - act.wizard.c: do_purge(): Need to NULL the character also. + +3/1/98 + +-- gg - limits.c: check_idling(): When we do an extract_char(), we have to + NULL out the descriptor's character pointer to prevent lossage later + in close_socket(). We could NULL in free_char() though... + +-- gg - objsave.c: Crash_listrent(): Rob Baumstark + reported that large rent files can crash the MUD with a buffer + overflow. + +-- gg - objsave.c: Crash_load(): Now counts objects in file for logging. + +-- gg - act.other.c: do_save(): Explicit 'save' commands by PC's are + disabled if 'auto_save' is set to YES. This prevents item duplication + via coordinated saves and system crashes. + +3/2/98 + +-- gg - act.informative.c: look_at_room(): Removed (long) cast. + +-- gg - utils.h: GET_ROOM_VNUM(): Changed to use real number instead of + character pointer and used throughout the code. Facilitated many + ch->in_room => IN_ROOM(ch) changes. + +-- gg - act.movement.c: Needs 'top_of_world' extern now. + +3/3/98 + +-- gg - utils.c/elsewhere: core_dump(): Extended to be used instead of + assert(). Now we'll get core dumps and continue running on Unix + or log a message and (optionally) continue running elsewhere also. + Many 'assert()' statements changed to if...core_dump() tests. + +3/4/98 + +-- gg - comm.c: make_prompt()/process_output(): Mobs were using PRF_FLAGGED. + act.informative.c: look_at_room()/do_score(): Ditto. + +-- gg - graph.c: do_track(): Mobs cannot use 'track' command. If you want + them to track things, use 'hunt_victim()'. + +-- gg - modify.c: string_add(): Tilde killing made compile time option + since I just realized nothing in stock CircleMUD cares. :) + Feel free to substitute your own method. (such as hide/show_tilde()) + +-- gg - mail.c: General hacking and lots of new comments. + +-- gg - shop.c: boot_the_shops(): Remove (byte) cast as it was reported to + cause problems/crashes. + +-- gg - act.comm.c: is_tell_ok(): Was using PRF_FLAGGED on mobs. + perform_tell(): Ditto. + +3/14/98 + +-- gg - act.offensive.c: do_rescue(): Added a \r\n to the 'only true warriors' + message as pointed out by Daniel Koepke + +3/16/98 + +-- gg - act.comm.c: perform_tell(): Also don't update ID number when a mob tells + you something. + +-- gg - db.c: Thought I already added that fclose(index); .... + +3/20/98 + +-- gg - limits.c: check_idling(): Doh, ch->desc->character = NULL was in + the wrong spot. :) + +-- gg - Used IS_[class] macros throughout. Nitpicked by Edward Glamkowski. + +-- gg - act.movement.c/graph.c: Check for fighting before and in perform_move(). + Suggested by Angus Mezick. + +-- gg - Removed 'extern' statements for non-existent variables. Pointed out + by Chris Powell. + +-- gg - act.informative.c: do_toggle(): Added a \r\n to end of string as + suggested by Joachim Pileborg. + +-- gg - modify.c: show_string(): Use any_one_arg() instead of one_argument + since we're looking for one letter and don't want to ignore fill + words if they happen to type it. Suggested by Andrey Fidrya. + +-- gg - objsave.c: Two places didn't check for bank gold but everywhere else + does. Pointed out by Andrey Fidrya. + +-- gg - act.movement.c: do_simple_move(): Mike Schlagenhauf pointed out + that gods and mortals can walk into godrooms. (>= GRGOD rooms) + +3/30/98 + +-- gg - shop.c: ok_damage_shopkeeper(): Julian Fong reported that we could + potentially reference [-1] if we have a non-prototyped mobile. + +-- gg - Removed redundant declarations from everything. + +-- gg - Removed all the nested 'extern' declarations. + +4/5/98 + +-- gg - structs.h/utils.h: CIRCLEMUD_VERSION changed to really be hex + and now has a helper macro VERSION(). + +5/13/98 + +-- gg - utils.h: Chris Powell correctly pointed out over a month ago + that CAN_SEE_OBJ_CARRIER should use 'sub' and not 'ch'. + +5/27/98 + +-- gg - act.wizard.c: do_set(): Added 'age' to "set." + +******** Patchlevel 13a *************************************************** + +6/4/98 + +-- gg - shop.c: Extraneous log() statement was missed during sprintf()+log() + conversions. + +-- gg - comm.c: reap(): Added to take care of fork() with core_dump_unix(). + +-- gg - utils.h: CHECK_PLAYER_SPECIAL(): Allow it to be toggled off. + +******** Patchlevel 14 *************************************************** + +6/5/98 + +-- gg - graph.c: do_track(): Might get into infinite loop if in room with + no exits and skill check failed. Fixed to try 10 times. + +-- gg - comm.c: Handle the delete key in addition to backspace. Mailed in + by David A. Goldstein. + +-- gg - comm.c: In function `act': + comm.c:1892: warning: declaration of `sleep' shadows global declaration + +6/6/98 + +-- gg - spec_procs.c, act.comm.c, just about everything: + Evaluated 'static' variables and added some 'const.' + +6/13/98 (Saturday) + +-- gg - Added Acorn RiscOS support from Gareth Duncan + (garethduncan@argonet.co.uk). + +-- gg - utils.c: mudlog(): Matched prototype and function. The change was + due to compiler warnings. + +-- gg - sysdep.h: Removed SLASH from here as it's in db.h already. + +-- gg - Makefile.in: Added a LIBS variable for command-line override. + +-- gg - Added prototypes for every function. + +-- gg - castle.c: Worked around three warnings when using g++. + +-- gg - db.c: store_to_char(): "When you 'reply' after entering the game + before anyone tells to you, the reply results in telling to a mob." + Found by Eric Green and Stefan Wasilewski. + +-- gg - class.c: init_spell_levels(): 'Poison' spell wasn't assigned. + Found by Chris Epler + +-- gg - act.item.c: perform_give_gold(): Fixed the pluralization. + Found by Alex <3raf7@qlink.queensu.ca> + +-- gg - Eric Green suggested some buffers needed to + be larger to handle the possible inputs. + +-- gg - ban.c/house.c: Cleaned up non-existent file messages. + +6/15/98 + +-- gg - act.informative.c: perform_immortal_where(): Patched to prevent + players from doing a 'where' to see the title of a dark room. + +6/16/98 + +-- gg - act.offensive.c: do_bash(): Eric Green (ejg3@cornell.edu) pointed + out that we could bash someone not in the room and that a failed + bash still makes the person sit. + +-- gg - structs.h: Added a notice for FreeBSD users with MD5 passwords. + Jeremy's autoconf test for the bug will be better, of course. + +-- gg - constants.c: color_liquid[]: Added a \n for sprinttype. + +-- gg - act.other.c: do_save(): Cleaned up comments and now gives message + if auto_save is enabled. + +-- gg - handler.c: char_to_room(): Fixed a long standing bug that people + are still considered fighting until the next violence pulse when + they leave the room. Most visible when trying to goto and walk. + +-- gg - fight.c: damage(): Clay Hardin (clay@accessus.net) reported that + some people can autoflee with negative hit points. Fixed. + +-- gg - act.wizard.c: do_set(): Fixed to not attempt char_from_room() + on player in NOWHERE on advice of Eric Green. + +-- gg - comm.c: close_socket(): Fix a memory leak if a person writing a + note is disconnected, also by Eric Green. + +-- gg - mail.c: read_delete(): Fixed to not cause a crash on dumb sprintf()'s + that crash on a NULL pointer. From: Krautz Thomas + + +-- gg - magic.c: mag_unaffects(): Don't output 'no effect' message when + casting heal due to blindness unaffect. + spell_parser.c: mag_assign_spells(): Heal isn't an affect spell. + +-- gg - comm.c: Borland and Microsoft use different headers. (Joy!) + +-- gg - class.c: Added support for 'siteok_everyone' flag. + config.c: Added 'siteok_everyone' flag, see config.c for explanation. + +-- gg - act.wizard.c: do_stat_object(): Comment on basis of invisibility. + interpreter.c: perform_dupe_check(): Comment on things to do. + utils.h: CAN_SEE_OBJ_CARRIER(): Close up final loophole. + +-- gg - spec_procs.c: Remove unused 'struct social_type' + +-- gg - interpreter.c: nanny(): Fixed final loophole in player duplication. + +-- gg - act.offensive.c: do_flee(): Here's a great bug, no one _ever_ lost + experience for fleeing because they stopped fighting before the + check to see if they were fighting... + +-- gg - act.offensive.c: Remove restriction of CLASS_WARRIOR from skills. + Now depends only on if they have the skill or not. + +-- gg - act.offensive.c: do_assist(): Hit the enemy the person you're + helping is, not the first person in the list. + +-- gg - act.movement.c: find_door(): Fixed a hard-coded "close" in message. + +-- gg - act.offensive.c: do_bash(): Fixed the 'bash-in-peaceful-room' bug. + act.other.c: do_steal(): Similiar bug here. + +-- gg - act.item.c: find_eq_pos(): \n added to prevent explicit wearing + on reserved spots. + +-- gg - Enabled the 'teleport' spell. + +-- gg - spell_parser.c: mag_assign_spells(): 'clone' is self-only. + The flags were previously contradictory. + +-- gg - utils.h: GET_MOB_SPEC(): Fixed the () order. + +-- gg - Removed unreachable code in various files. + +6/18/98 + +-- gg - Check out the bug archive. http://bugs.circlemud.org + +-- gg - Fixed up all of the 'aggregate return' warnings. + +-- gg - modify.c: show_string(): Anil Mahajan + spotted a potential (but unlikely) buffer overflow. + +6/20/98 + +-- gg - boards.c: Cleaned up malloc() calls into CREATE(). Created a + sort ordering define, defaulting to the historic order. Fixed + bug #19 from Julian Fong. + utils.c: core_dump(): Assorted cleanups, combining core_dump_unix() + and core_dump_other() into one function. + sysdep.h: Updated systems for core_dump_() cleanup. + utils.h: Updated core_dump() prototypes. + +6/21/98 + +-- gg - boards.c: Fixed printing. Created House_list_guests() since + code was duplicated in two places. + +-- gg - act.offensive.c: do_kick(): Same check to make sure the person is + still in the room as do_bash now has. + +-- gg - Fixed even more sprintf(buf, "%s ...", buf, ...) constructs. + +-- gg - damage() changed to return an integer so we know if the target was + hit, if they died, or how hard they were actually hit. + +-- gg - boards.c: Board_display_msg(): Fixed 'read 2.mail' bug when in + front of a board. + +-- gg - boards.c: Revamped code to pass around the board's obj_data pointer. + Now allows boards to be referred to as other things. Suggested by + Andrew Hynek Also made 'truncate to 80' comment + fit the code. (0-79 = 80, so 80 should be NUL, not 81.) + +-- gg - db.c: boot_db(): House loading moved to before zone reset so the + object limits work correctly. + +-- gg - act.wizard.c: do_show() extended to use page_string(). + +-- gg - cnf/configure.in: Added 'less' and 'most' to pager search. + A brief 'autoconf tutorial' pointer would be appreciated. + +-- gg - db.c: Fixed the '2 aliases per help record' bug. See the file + for credit information. Also added an 'informative' log about + the number and size of data structures created sans strings. I + do note that the numbers don't agree with the 'show stats.' + Perhaps a deeper investigation is in order... + +-- gg - config.c/act.wizard.c: New variable 'load_into_inventory'. + You should be able to guess what it does. + +======= +6/29/98 + +-- JE - README.*, doc/README.*: Documentation updated. README file + was cleaned up; compilation instructions for all platforms were + moved into a README.XXX file in the doc directory. The old + README.WIN, which actually had instructions for MSVC, was renamed + README.MSVC. README.GNU-WIN32 was added from David Goldstein. + README.WIN now simply directs people to look into one of those + files. README.MAC is still missing. + +-- JE - ChangeLog: Fixed a small error in an earlier ChangeLog + entry that described pl12 improvements in networking code. + +-- JE - src/[mM]akefile.bcc - Changed name from makefile.bcc to + Makefile.bcc to match the other Makefiles. + +-- JE - cnf/configure.in - Changed to add -Wno-char-subscripts to the + gcc command-line if we're using gcc and gcc recognizes the option. + The newer GCCs complain about the standard library's islower(), + isupper(), etc., on some machines, such as Solaris. + +-- JE - src/comm.c, cnf/configure.in, src/sysdep.h - Changed autoconf to + detect whether we have inet_aton and/or inet_addr; added prototypes + for those functions in sysdep.h if we have the functions and they're + not prototyped; and added support in comm.c to bind to a specific + IP address (instead of all IP addresses) on a multihomed host. + +-- JE - src/db.c: Improved parsing of database files and added more + meaningful error reporting in some places. + +-- JE - cnf/configure.in, src/comm.c, src/sysdep.h: Added arpa/inet.h to the + list of header files we check for and include. + +-- JE - src/comm.c: Removed "#ifdef SO_SNDBUF" where it wasn't needed. + +-- JE - cnf/configure.in: Fixed a longstanding bug in the -cckr detection, + and a similar bug in the recently added -Wno-char-subscripts + detection; the flags would not be set correctly if configure + was ever rerun (i.e., if values were read from the cache). + +6/30/98 + +-- JE - cnf/configure.in, configure: We now only use -Wno-char-subscripts + if we are using gcc, we get warnings without it, and gcc accepts it. + Bug #73 in bug database. + +-- JE - src/comm.c: Fixed a bug in IP address binding - we need to clear + the sockaddr_in structure with memset() before using it. + +-- JE - src/comm.c, src/sysdep.h, cnf/configure.in, configure: Changed + the code in comm.c to use inet_ntoa() for changing numeric IP + addresses into ASCII instead of printing it manually using + shifts and sprintf(). Changed autoconf scripts to detect + whether or not inet_ntoa() needs to be prototyped. + +-- gg - comm.c: write_to_descriptor(): Cleaned up various platform support. + comm.c: Removed headers commented out in bpl13. + comm.c: process_input(): General platform cleanup. + +-- gg - comm.c: write_to_descriptor(): Jeremy made something up for this + also which I like better. I've tweaked my previous process_input() + changes to fit the same idea, but they were pretty close already. + +-- JE - cnf/configure.in - Removed the -cckr check from configure because + it seems to break compilation on IRIX's cc (bundled) compiler, + which is what it was put in to fix many years ago. + +-- JE - src/comm.c - Broke up write_to_descriptor() into two functions + so that platform-dependent pieces would be isolated. + +7/1/98 + +-- JE - src/comm.c - Further bug fixes in socket handling code. + +-- JE - src/conf.h.*, src/Makefile.win, src/sysdep.h, src/comm.c, + doc/README.MSVC -- I updated Win 95/NT compatibility. The idea + now is that *all* Windows-based compilers (MSVC, Borland, and + Watcom) should share the same conf.h.win, but they each have their + own Makefile. The CIRCLE_MSVC and CIRCLE_BORLAND constants were + removed in favor of a single CIRCLE_WINDOWS constant; we use + Borland's builtin __BORLANDC__ to detect Borland compilation. + Makefile.win was renamed Makefile.msvc to differentiate it from + Makefile.bcc. README.MSVC updated appropriately. + +-- JE - src/comm.c: Changed perform_socket_read and perform_socket_write + to use ssize_t and size_t again, as George originally suggested. + +-- JE - doc/README.*: More changes to documentation for Windows users. + +7/2/98 + +-- ae - FAQ: updated the FAQ version distributed with CircleMUD. + +-- ae - lib/world/obj/15.obj: Corrected some flags and some edescs. + +-- gg - comm.c: main(): Now use fdopen() instead of explicit assignment + of 'stderr' to 'logfile'. This should work fine elsewhere because: + "The fdopen function conforms to IEEE Std1003.1-1988 (``POSIX.1'')." + +-- gg - comm.c: getrusage(): Use RUSAGE_SELF instead of 0. Suggested by + Christian Loth + +3 July 1998 + +-- JE - src/comm.c, src/sysdep.h: We only prototype the getrlimit()/ + setrlimit() functions if we appear to have those functions + available. Fixes half of Bug #79. + +-- JE - src/comm.c, src/sysdep.h: Changed logfile opening to use the + POSIX-defined STDERR_FILENO instead of a magic number (2). + Changed sysdep.h to use the magic number if the POSIX def'n + is missing for some reason. + +-- JE - Released patchlevel 14. + +******** Patchlevel 15 *************************************************** + +7/3/98 + +-- gg - constants.c: Incremented string version number. + structs.h: Incremented #define version number. + +-- gg - Patch for arbitrary bitvector size changes from Christian Loth + included. (bitvector_t) + +-- gg - structs.h: Sector flying and underwater reversed to match constants.c + +7/5/98 + +-- gg - comm.c: new_descriptor(): Yep, 'i' should be signed. + +7/29/98 + +-- gg - Replaced 'return x;' with 'return (x);' to be consistent. + Patch by Trevor Man . Reverse of what + I had hoped, but ah well. :) + +8/6/98 + +-- gg - act.item.c: search_block triggers on \n, use \r instead. + +8/24/98 + +-- gg - sysdep.h/Makefile.lcc/conf.h.lcc: LCC compiler support added by + Eric Jones . I'll see if there is a + __BORLANDC__-like constant we can use to get rid of conf.h.lcc... + +-- gg - comm.c: "d. hall" sent a patch to change timeadd() + and timediff() to not use static variables like we wanted before. + +-- gg - util/shopconv.c: Given a dummy basic_mud_log() to take care of + undefined reference since some macros use it now. + +-- gg - act.other.c: do_steal(): Yaroslav Berezovsky aka Morgion//RMUD found + a bug where the victim had to be able to see an object for the thief + to steal it... + +8/25/98 + +-- gg - AutoEQ from Burkhard Knopf + comm.c: init_game(): Save everyone before exiting. + handler.c: invalid_align(): New function. + handler.c: equip_char(): Use invalid_align(). + handler.c: invalid_align(): prototype. + interpreter.c: nanny(): Place character in room before equipping. + objsave.c: Obj_to_store()/Obj_from_store()/Crash_save(): Modified + to include location arguments. + objsave.c: auto_equip(): New function, sanity checks eq positions. + objsave.c: Crash_listrent(): Also show rent locations. + objsave.c: Crash_load(): Huge block of code to handle equipping. + objsave.c: Crash_extract_norents_from_equipped(): New function. + structs.h: obj_file_elem: 'location' added. (Sort of, it's pending + approval.) + +-- gg - act.comm.c: do_gen_comm(): Use AWAKE() macro. From + Richard Glover + +-- gg - act.item.c: Curse containers if you put a cursed object in them. + +-- gg - comm.c: main(): Added help text for '-h' option. + +-- gg - act.informative.c: do_time(): Simplified by suggestion from + Andrew Jones + +-- gg - constants.c/comm.c: Uh, 'version' used to crash. :) + +-- gg - act.comm.c: do_spec_comm(): Removed extra \r\n from act(). + +-- gg - act.movement.c: has_boat(): Del suggested + immortals should get to walk on water. Now gods can walk on water + but guest immortals (LVL_IMMORT) still need boats. + +8/26/98 + +-- gg - Changed 'struct alias' to 'struct alias_data' since a Windows 95 + compiler gripes that it has a member of the same name. + +-- gg - autorun: Don't sleep if we're going to die anyway. + +-- gg - db.c: Disable zone commands which will endlessly error. + +8/28/98 + +-- gg - Removed 'extern int top_of_world;' everywhere. + db.h: Included extern for top_of_world here instead. + (Should fix some of the Windows 'integral size mismatch' warnings.) + +-- gg - act.other.c: do_save(): Allow gods to save even if we're in + automatic saving. Immortals (31) still cannot by default. + +-- gg - comm.c: DFLT_IP/DFLT_DIR/LOGNAME/help: Some extern declarations + cleaned up to be what they should. + +-- gg - comm.c: main(): Reworked to avoid implicit 'stderr' usage and + allow an argument for log file to redirect to. + +-- gg - comm.c/comm.h: send_to_room(): Changed to room_rnum. + +-- gg - structs.h: obj_file_elem: Add a few spares since we're going to + change the structure anyway. + +-- gg - comm.c: process_input(): Output command we find from history. + From Akuma the Raging Coder. + +-- gg - interpreter.c/utils.h: IS_NPC changes from idea by Yaroslav + Berezovsky To be completed later though. + +8/29/98 + +-- gg - act.wizard.c: do_show(): 'show snoop' + +-- gg - shop.c: 'buy 3' now possible and doesn't break 'buy 5 3', + 'buy 5 #3', or 'buy #3'. + +9/3/98 + +-- gg - db.c: index_boot(): prefix set to NULL to prevent spurious warning + from egcs 1.1. (Headache prevention.) + +9/7/98 + +-- gg - act.wizard.c: do_set(): age: ch<->vict. + +9/9/98 + +-- gg - modify.c: string_write()/smash_tilde(): Got fed up with many + places in the code (and external packages) manually setting up + the writing code so I created string_write() to hide that. + smash_tilde() envelopes previous code in string_add() in a way + to be compatible with other codebases. + +-- gg - mail.c: postmaster_send_mail(): Converted the final malloc() in + the code to use CREATE(), and converted to string_write() also. + +-- gg - boards.c: Board_write_message(): Changed to string_write(). + +-- gg - Makefile.lcc: Update from Eric Jones . + +-- gg - macrun.pl: New from Dean Takemori + in case you have a Macintosh with Perl. + +-- gg - act.informative.c: do_toggle(): Added holylight/nohassle/roomflags + for immortals, from Del Minturn . + +9/12/98 + +-- gg - act.comm.c: do_write(): Now uses string_write() interface. + olc.c: olc_string(): Ditto. + +-- gg - db.c: check_object()/check_object_spell_number()/ + check_object_spell_level(): Beginnings of object verification. + This caught about 7 objects with bad spell numbers, names, or levels. + +-- gg - modify.c: string_write(): Modified to allow generic data to be + passed through later. The improved editor could use this to send + the 'old' buffer for instance. + +-- gg - spell_parser.c: spello(): Report spells with invalid names. + +-- gg - spell_parser.c: skill_name(): Minor cosmetic touchup. + +-- gg - spell_parser.c: mag_objectmagic(): Wands with an area effect or + mass spell don't need to be pointed at anything. + +9/15/98 + +-- gg - utils.c: get_line(): Faster, cleaner, and most importantly, easier + to read. + +9/20/98 + +-- gg - utils.c: str_cmp()/strn_cmp(): Now gracefully handle a NULL pointer + and I also took the opportunity to make them look cleaner. + utils.c: basic_mud_log()/mudlog()/get_filename(): Should be able to + handle a NULL pointer now. + +-- gg - utils.h: IS_NPC(): MOB_ISNPC is back, for now. + +-- gg - Added the long-awaited alias saving to file support courtesy of + Jeremy Hess and Chad Thompson. Directories added in lib/ also. + +-- gg - comm.c: main(): Think I heard of a report where fdopen() didn't + work under Windows so I added a little note there for people. + +9/21/98 + +-- gg - magic.c: mag_unaffects(): Fixed cosmetic bug (of mine) whereby the + "your vision returns" message was shown when you weren't blind. + +-- gg - spell_parser.c: call_magic(): Fixed to return -1 when a target + dies, so that mag_objectmagic() can correctly exit instead of + casting another spell from a scroll at a stale target. + +-- gg - utils.h: WAIT_STATE(): Needed "do { xxx } while(0)". + +-- gg - act.offensive.c: do_bash(): Few fixes for NPC's and wimpy mode. + +-- gg - spells.c: spell_enchant_weapon(): It is a bad thing to enchant a + weapon that you are currently wielding. Since I think it makes + more sense to just not be able to do that than jump through hoops + with equipping, I've remove the TAR_OBJ_EQUIP flag from it. + +-- gg - comm.c: perform_act(), act.informative.c: list_one_char(), + interpreter.c: command_interpreter(): All changed with IS_NPC() + fixes from Andrey Fidrya + +-- gg - magic.c: mag_affects(): Don't allow strength if we already have + 100% strength add. + +-- gg - act.other.c: do_steal(): Easy but not automatic stealing from + sleeping people. + +-- gg - comm.c: setup_log(): Handle all the log() nasties. + +-- gg - sysdep.h: Check for STDOUT_FILENO too. + +9/27/98 + +-- gg - objsave.c/structs.h: Enable autoeq on USE_AUTOEQ definition. + +-- gg - act.item.c: Duplicated 'extern obj_proto;' + +10/1/98 + +-- gg - utils.h: VALID_RNUM(): New macro made from common code in + GET_ROOM_VNUM() and GET_ROOM_SPEC(). + utils.h: GET_ROOM_VNUM(): Needs (room_vnum) cast for MS VC++ 5. + +-- gg - comm.c: 'port' should be an unsigned short integer. + config.c: DFLT_PORT changed to ush_int too. + +-- gg - act.wizard.c: do_at(): location/original_loc should be room_rnum. + act.wizard.c: perform_set(): New room_rnum variable for case 35. + +-- gg - db.c: reset_zone(): Couple casts to hush up Microsoft Visual C++. + There isn't another way. + +-- gg - house.c: hcontrol_destroy_house(): real_atrium/real_house converted + to room_rnum variables. The atoi() result casted to room_vnum. + house.c: hcontrol_pay_house(): atoi() result, ditto. + +-- gg - shop.h: 'keeper' variable changed to mob_rnum and comment fixed. + It is saved on disk as a vnum but changed in boot_the_shops() to + be a real number. + +-- gg - spec_procs.c: pet_shops(): 'pet_room' is a room_rnum now. + spells.c: spell_teleport(): 'to_room' is a room_rnum now. + +-- gg - Even more xxx_rnum/xxx_vnum changes, to the real_xxx() functions. + +-- gg - db.c: check_object_spell_level(): Note that it is a bad idea to + assign an area or mass spell to a staff. It is not overridden, + just warned about. + +10/3/98 + +-- gg - act.movement.c: do_stand(): Player may still be fighting at this + point so we should set them POS_FIGHTING if so. + Reported by Jon Barrett . + +-- gg - act.wizard.c: do_switch(): Don't permit people under Greater God + to switch into mobs in god rooms or houses. + +-- gg - Assorted skills now have new IS_NPC and GET_SKILL checks. + +10/5/98 + +-- gg - spec_assign.c: Fixed up mob|room|obj_v|rnum problems in ASSIGNMOB, + ASSIGNROOM, ASSIGNOBJ. + castle.c: block_way(): Fixed up room_rnum problem. + olc.c: do_olc(): Ditto. + +-- gg - act.wizard.c: room_rnum things fixed and use skill_name() now in + do_stat_character(). + +-- gg - db.c: check_object_spell_number(): Disabled the check for an area/mass + spell on a staff because the bug has been fixed. + +-- gg - spell_parser.c: mag_objectmagic(): Fixed the bug where a victim + dying in the middle of a staff spell caused a crash. + +-- gg - Merged new spell routine changes that get rid of spells[] in favor + of spell_info[].name. Also removed dead code from db.c. + +10/7/98 + +-- gg - db.c: check_object_spell(): Another magic niggle, the spells don't + have names in syntax check mode. + +-- gg - Merged a bunch of sh_int/int -> *_[rv]num changes from + Bryan Britt + +-- gg - More little logging changes. Sometimes I really hate portability. :P + +-- gg - house.c/db.c: g++ found some mismatched prototypes. + +10/8/98 + +-- gg - graph.c: Assorted room_rnum fixes. + +10/10/98 + +-- gg - cnf/configure.in: Added checks for "remove" and "strerror". + sysdep.h, conf.h.in: NEED_REMOVE_PROTO and NEED_STRERROR_PROTO added. + +-- gg - act.social.c act.other.c ban.c e boards.c comm.c db.c fight.c + graph.c house.c objsave.c shop.c: Updated to make sure all + perror() and log() calls have SYSERR where appropriate. + +10/12/98 + +-- gg - comm.c: Updated some 'const' usage in act() and related functions. + +10/13/98 + +-- gg - Massive minor changes to the code to eradicate some (quite accurate) + warning messages from Borland C++ sent by Mundi King + +-- gg - utils.h/utils.c: CAP() is now a function instead of macro to eliminate a + "statement with no effect" warning when not using the return value. + +-- gg - utils.c: int_to_short(): Sneak around the Microsoft Visual C++ warnings + if there is no other way to avoid it. + +-- gg - comm.c: Socket errors beyond our control are flagged as a WARNING in the + same manner as bugs in the code are flagged SYSERR. + +-- gg - shop.h/shop.c: Fixed the bug causing 'keeper' in the shop structure to + be an int. + +-- gg - db.c/db.h: More int/sh_int cleanups with int_to_short(). Including changes + to zone_data and top_of_zone_table. + +-- gg - Even more Microsoft Visual C++ warning fixes. Warnings sent in by + OmnousMan@aol.com and Sean Daley . + +-- gg - castle.c: Major cleanup of appearance. + +-- gg - cnf/configure.in, cnf/aclocal.m4, configure: New directives to check for + 'struct in_addr' and an unsafe crypt() function with only 10 characters. + +-- gg - structs.h: Code to check for an unsafe password length of 10. + sysdep.h: Code to accommodate systems with no 'struct in_addr' + +10/16/98 + +-- gg - comm.c: nonblock(): Use 'unsigned long' for Windows ioctlsocket(). + +-- gg - comm.c: open_log(): Use "easy" method for GNU C and MetroWerks (no fdopen). + +-- gg - db.c: More int_to_short() for MSVC. + magic.c: Some variable fixups for warnings, mob_vnum and obj_vnum; + +-- gg - objsave.c: Crash_delete_file(): s/unlink/remove/ + +-- gg - comm.c: Also check for WSAEINTR as Andrew Helm suggests. + +-- gg - sysdep.h: Mundi King gave me some #pragma's to + disable warnings in Borland C++, how quaint. Also had to give an isascii() + macro for MetroWerks since they couldn't add one line to their headers. + Also took the opportunity to clean up the "Who are we?" error message into + something a bit more descript. + +10/21/98 + +-- gg - db.c, config.c: Load GREETINGS from a file instead of config.c. + See lib/text/greetings. + +-- gg - castle.c: Fixed a few short int warnings. + +-- gg - utils.c: prune_crlf(): Fixes up GREETINGS to look right. + +10/23/98 + +-- gg - Thanks to Francis Hotchkiss for testing the + FreeBSD configure changes. (The test does work.) + +10/27/98 + +-- gg - act.wizard.c, class.c, limits.c: Changed advance_level() to not + print the advancement message so the calling functions can do so + without spamming the system logs and online wizards. + +-- gg - act.informative.c: look_at_target(): "look 2.obj_with_extra_desc" + bug fixed. + +-- gg - comm.c: close_socket(): Andrey Fidrya pointed + out we could have a player special called on a mobile. + +-- gg - act.wizard.c: do_purge(): mudlog() required a GET_INVIS_LEV check. + +-- gg - act.comm.c: do_tell(): Only allow immortals to "tell" to a mobile + to prevent player abuses. + +-- gg - act.item.c: Multi-give/drop/donate/junk/put/get. + +10/28/98 + +-- gg - alias.c, db.c: Fix a couple '%d' warnings, hopefully. + +-- gg - modify.c: show_string(): Fix a warning on 64-bit platforms with + casting a pointer to an integer. + +-- gg - utils.h: Better IS_NPC check added, though still commented out + in favor of the old, faithful one. + +-- gg - act.item.c: do_drop(): Fixed a bug WRT junking objects. 'amount' + was re-used inadvertently. + +-- gg - doc/README.BORLAND: It's actually helpful now. + +-- gg - db.c: create_entry(), init_char(): Need to check for replacing an + old character in the player table. + +11/2/98 + +-- gg - comm.c: get_max_players(): "random guess" was missing a ; + From: Josh McBeth + +-- gg - limits.c: Del pointed out that I + forgot to make sure someone levelled before printing message. :) + +11/9/98 + +-- gg - db.c: Duh, get_id_by_name() doesn't return player table array + index, so now get_ptable_by_name does. + +11/15/98 + +-- gg - objsave.c: update_obj_file(): Don't update empty names. + +11/22/98 + +-- gg - class.c: do_start(): Don't need to set_title() the person because + they have already had it done by init_char(). Found by + "Andrey Fidrya" + +11/23/98 -- Hereby proclaimed Rick Glover bug report day. + -- All of this day's bug fixes are from him. + +-- gg - spell_parser.c: mag_objectmagic(): Remove superfluous '!= NULL' + from action description check on suggestion. + +-- gg - act.informative.c: list_obj_to_char(): We don't initialize a variable + on the declaration line but do it on the next line down. I'm glad + I'm not the only picky person around here. :) + +-- gg - act.informative.c: do_score(): Redundant IS_NPC() checks removed. + +-- gg - act.item.c: get_check_money(): We had bad grammar. + +-- gg - act.item.c: do_drop(): Mixed up 'amount' and 'multi' in a sprintf() + during the multiple object changes. + +-- gg - Massive act() -> send_to_char() search and replace. + +-- gg - act.offensive.c: do_backstab(): WAIT_STATE() added. + +-- gg - act.wizard.c: do_show(): 'player' updated to use "buf + strlen(buf)". + +-- gg - boards.c: He also pointed out a 'board.h' typo. + +-- gg - He also noticed 'r_*_start_room' used 'sh_int' which prompted me + to search and replace many other instances of 'sh_int' misuse too. + +-- gg - db.c: index_boot(): He found a redundant 'break' after 'exit()'. + +-- gg - magic.c: mag_areas(): Didn't pass 'level' variable handed to us + to mag_damage(). + +-- gg - magic.c: mag_points(): Variables compressed to same line. + +-- gg - db.h: LIB_OBJS removed, it wasn't used. + +11/24/98 + +-- gg - db.c, act.informative.c: Removed 'extern spells[]'. Thanks to RG. + +-- gg - modify.c: do_skillset(): Spacing fixed when skills are skipped. From RG. + +-- gg - mobact.c: mobile_activity(): Charmed/blinded mobs can't help. From RG. + +-- gg - act.offensive.c: do_backstab(): Aware mobs aren't when asleep. From RG. + +-- gg - shop.c: evaluate_expression(): Remove isalpha() to allow '(' first. + shop.c: evaluate_operation(): &&/|| fixed to always pop both values. + Thanks to Lubos Lunak for finding these. + +12/1/98 + +-- gg - ChangeLog: Ran it through ispell while avoiding gratuitous changes. + +12/2/98 + +-- gg - utils.h: RG noted we had prototypes for {mana,hit,move}_limit but + removed the functions. + +-- gg - class.c: do_start(): We really do need the set_title() or newbies + start out with the level 0 title. + +12/10/98 + +-- gg - utils.c, utils.h: {mana,hit,move}_limit() don't exist and ush_int + to int conversion in core_dump_real(). + +-- gg - act.comm.c: do_page(): Extra \r\n removed from sprintf(), by RG. + +-- gg - act.social.c: fread_action(): is really local, by RG. + +-- gg - boards.c: Typo fixes and some spacing additions, by RG. + +-- gg - castle.c: Some act() -> send_to_char() where appropriate, by RG. + spec_procs.c: Ditto. + +-- gg - config.c: Some variables changed sh_int -> room_Xnum. + +-- gg - db.h: save_char() prototype sh_int fixes and LIB_OBJS removed. + +-- gg - house.c: More room_Xnum fixes, by RG I believe. + +-- gg - interpreter.c: More room_Xnum fixes. + +-- gg - mobact.c: mobile_activity(): Blind and charmed mobs shouldn't + be helping in attacks. By Rick Glover. + +12/15/98 - It's not a Y2k problem, I'll just write out 2000 afterwards. :P + +-- gg - act.item.c: Merged more act() -> send_to_char() fixes. Also fixed + the '\n' in the wear list. Lastly, revamped get_check_money() to + be plurally correct. + +-- gg - act.movement.c: has_boat(): Fixed return parenthesis. + do_doorcmd(): Removed extra \r\n. + do_stand(): More act() -> send_to_char() changes merged in from RG. + +-- gg - act.offensive.c: do_backstab(): Sleeping mobs aren't "aware," and + added delay to prevent abuse. + do_kick(): Use new function compute_armor_class(). + +-- gg - act.other.c: do_quit(): RG suggested removal of 'save_room.' More + act() -> send_to_char() fixes in the code. + +-- gg - act.wizard.c: do_stat_character(): RG noted that dexterity isn't + factored into armor class, fixed. + do_show(): He also noted we need "buf + strlen(buf)" here. + +-- gg - db.c: sh_int/*_?num fixes. + +-- gg - fight.c: compute_armor_class(), compute_thaco(): New functions. + death_cry(): Use send_to_room instead of act() hackery. + hit(): Don't use weapon damage values if it isn't a weapon, from RG. + Also more act() -> send_to_char() fixes. + +-- gg - handler.c: act() -> send_to_char() fixes. + +-- gg - magic.c: mag_savingthrow(): Took idea for modifier value to be + added, from Edward J Glamkowski . + Callers changed throughout. + +-- gg - modify.c: do_skillset(): Screen spacing of skills fixed on + suggestion by Rick Glover . + +-- gg - objsave.c: Crash_save(): Reversed order of item saving to fix + bug that made auto equipment not work. Also minor touchups. + Rent problem reported by Rick Glover. + +-- gg - shop.c: evaluate_operation(): Lubos Lunak + found that the stack was messed up by compiler short-circuiting. + Also changed isalpha() check to allow a ( first. + +-- gg - spell_parser.c: More act() -> send_to_char() fixes. + +-- gg - act.informative.c: act() -> send_to_char() fixes and some old + now-gone externs removed. + do_score(): Cleaned up unneeded IS_NPC() checks, by RG. + +-- gg - comm.c: Cleaned up buffer checking code. + write_to_output(): Moved strlen() to avoid wasted time. + +12/16/98 + +-- gg - act.informative.c: do_diagnose(): Superfluous 'return' removed + as suggested by Rick Glover. + +1/8/99 + +-- gg - act.other.c, config.c, graph.c, interpreter.c, interpreter.h: + TRACK_THROUGH_DOORS the #define has become 'track_through_doors' + the runtime changeable integer in config.c. VALID_EDGE() also + went over the brink of readability and became a function. + +1/12/99 + +-- gg - fight.c: Fixed up compute_armor_class() to not divide since only + one place cares about the internal value. + +1/13/99 - Wednesday + +-- gg - sysdep.h: Great, now winsock1/winsock2 conflict in Borland. What + a pain. Jodi Goddard was the first to mail me + the correct definitions to test for it. + +1/15/99 + +-- gg - fight.c: compute_armor_class() should add dex_app * 10 since the + old code divided first, then added the modifier. + +1/24/99 + +-- gg - util/listrent.c, util/split.c: Rick Glover pointed out a few \n\r's. + +-- gg - castle.c: King Welmar's movements needed ASCII adjustments. + +1/25/99 + +-- gg - handler.c: generic_find() needs to NULL the arguments _first_ in case + our argument only has a fill word. Fixes crash reported by Rick + Glover that I couldn't originally reproduce. + act.item.c: do_get(), do_put(): Use one_argument() instead of half_chop + to allow for fill words. + +1/29/99 + +-- gg - act.comm.c: Some more act() -> send_to_char() from Rick Glover. + +2/2/99 + +-- gg - Got rid of int_to_short() in favor of a #pragma to disable the warning. + +2/16/99 + +-- gg - First batch of Rick Glover bug reports. + Makefile.in + OBJFILES and CXREF_FILES sorted, alias.o moved alphabetically. + act.informative.c + do_gen_ps(): Added log() for unhandled case. + act.item.c + do_pour(): Removed superfluous 'return;' at end. + act.movement.c + Bitvectorized NEED_xxx #define's to be more obvious. + do_leave(): Use OUTSIDE(). + do_wake(): Use AWAKE(). + act.other.c + do_steal(): Use two_arguments(). + do_wimpy(): Removed superfluous 'return;'. + act.wizard.c + perform_set(): Prevent only freezing self, not thawing self. + class.c + level_exp(): Log the bad level in the report. + comm.c + 'extern' variables extricated from the global variables. + shop.c, shop.h + 'producing' is now an obj_vnum. + spells.h + TAR_xxx defines bitvectorized instead of numbers. + +3/4/99 + +-- gg - comm.c, structs.h, utils.h: PjD noticed that repeatedly reconnecting + to a MUD would cause the wait state counter to be reset. Thus it + has been merged with the mob counter. + +-- gg - act.other.c: do_split(): Fixes from Christian Loth to not lose + money and fix the accounting among a group. Untested but looks ok. + +-- gg - spell_parser.c: say_spell(): King Mundi proposed fix so that the + MUD doesn't go into infinite spastic loop upon unknown substring. + +-- gg - objsave.c: Crash_load(): "Andrey Fidrya" sent + in a fix for potentially empty rent files. + +-- gg - Usual batch of Rick Glover reports: + structs.h + room_data: 'zone' should be zone_rnum. + index_data 'vnum' should be a 'sh_int' type. + act.item.c + 'the $o' changed to '$p' for better clarity. + act.wizard.c + do_force: Mobs are now immortal subordinate. + do_set: height/weight; "sex" set type is much less + complicated with search_block now. + constants.c + Lowercased genders[] for do_set to work ok. + comm.c + make_prompt: buffer length fixed to track + MAX_PROMPT_LENGTH changes. + db.c + read_mobile: Should have WARNING tag on log() message, + because while not a SYSERR, it is sort of bad. + handler.c + affected_by_spell: Fixed up comment. + objsave.c + gen_receptionist: HSHH() for "she" + interpreter.c + Remove AFF_GROUP flag in addition to PLR_WRITING, etc. + +-- gg - class.c: levels(): Sean Daley noticed + I forgot _every_ 'break;' in the switch() block. :) + +3/5/99 + +-- gg - Desmond Daignault sent in a + fixing up get_char_room_vis and get_char_vis like I wanted, + to be consistent with get_player_vis. The old function still + exists, it's just not used except by get_char_vis. + +3/10/99 + +-- gg - Rick Glover found some old CRIMEOK references in magic.c + +******** Patchlevel 16 *************************************************** + +3/17/99 + +-- gg - constants.c: Version string updated to bpl16. + structs.h: Preprocessor version number updated to bpl16. + +-- gg - First person to find a stupid bug award goes to Rick Glover + who noticed do_say and do_gsay are missing \r\n. + +-- gg - Wonder how no one noticed that 'sleep' spell sends its message + to the caster instead.... Found by RG. + +-- gg - 'prompt none' gave the help message. Found by RG. + +-- gg - act.other.c: do_quit(): Revert previous change because of + extract_char() behavior. + +3/26/99 + +-- gg - Added README.MSVC6. We don't have Microsoft Visual C++ 6 so + we cannot confirm the accuracy of anything contained therein. + +4/11/99 + +-- gg - Fixed typo '-P0' to '-P-' in Makefile.bcc. + +4/16/99 + +-- gg - modify.c: string_add(): Fix Obiwan error in maxstr handling. + It no longer accepts 10 characters & NUL for a 10 character limit. + +5/1/99 + +-- gg - act.wizard.c: do_show(): case 3: Check for NUL value. + +-- gg - structs.h: mob_rnum nr; + +5/3/99 + +-- gg - comm.c: Last usage of d->connected replaced with STATE(d) + +-- gg - fight.c: damage(): Don't divine rescue people who can't flee. + Previously could result in being rescued after death because + then !FIGHTING() is true even though do_flee() failed. + +-- gg - sysdep.h: Yet another useless (to us in this case) MSVC warning. + +-- gg - comm.c: echo_off(): Fixed RFC compliance issue noted by + Matthew Bell + +5/4/99 + +-- gg - act.social.c: boot_social_messages(): More sanity checks to make + sure we don't stomp memory. + +5/9/99 + +-- gg - util/delobjs.c: Change unlink() to remove(). + +-- gg - shop.c, mobact.c, fight.c, class.c, spec_procs.c: Use constants.h + +-- gg - objsave.c: Removed unused str_app[] extern. + +-- gg - db.h: CIRCLE_VMS path declarations. + +-- gg - house.c: Fixed Obj_from_store() C++ linkage problem. + +-- gg - interpreter.h: Make cmd_info[] extern match declaration. + +-- gg - constants.h: Remove 'const' from int arrays to fix C++ linkage. + +5/10/99 + +-- gg - act.item.c, act.other.c: Use constants.h for more things. + From the VMS guy again. See README.VMS. + +-- gg - comm.c: New circle_sleep() function and various VMS fixes. + +5/18/99 + +-- gg - comm.c, config.c: s/MAX_PLAYERS/max_playing/ since the DEC + C compiler confuses it with 'max_playing' also. + +5/26/99 + +-- gg - circle.com, mud_utils.com, autorun.com: New utilities for + running CircleMUD on VMS from Robert Alan Byer. Before + people ask, these are _not_ DOS executable files. + +-- gg - act.other.c: do_practice(): NPC's cannot practice. + +-- gg - comm.c: game_loop(): Made output_ready() to appease VMS. + +-- gg - utils.c: mudlog() cleaned up and no longer tries to get colors + from a mobile. + +-- gg - vms_decls.h: New file, containing declarations the + operating system should have provided. + +-- gg - shop.c: top_shop is now array-based intead of counting-based. + +5/28/99 + +-- gg - Couple more VMS changes. Also made accept_arg_t since everyone + seems to differ on this variable's signedness. + +5/29/99 + +-- gg - objsave.c: Crash_listrent(): Was overwriting beginning of + information string with later information. + +6/3/99 + +-- gg - act.wizard.c: do_vnum(): Use half_chop() to allow fillwords. + From Rick Glover. + +-- gg - db.c: check_object(): Bitvector and drink container checks. + +-- gg - act.informative.c: do_score(): Plurality problem. + +6/6/99 + +-- gg - act.wizard.c: do_stat_character(): Remove gender special case. + This will have the side-effect of lowercasing the result, but + the simplicity is preferred here. + +6/11/99 + +-- JE - README.CYGWIN - incorporated new version from David Goldstein + +7/4/99 + +-- gg - comm.c: close_socket(): Check for IS_NPC() before PLR_MAILING. + +-- gg - db.c: Don't re-file_to_string_alloc() anything currently in + use by the pager. It's the least impact change. From + Andrey Fidrya + +-- gg - limits.c: Autowiz support for Windows from + Julian Buckley + +-- gg - modify.c: string_add(): Yet another fix to make the buffer + limits safe. From Andrey Fidrya . + +-- gg - objsave.c: Crash_extract_norents_from_equipped(): + Um, duh. Helps to use functions. :) Spotted by + Andrey Fidrya . + +7/10/99 + +-- gg - spell_parser.c: ACMD(do_cast): Equipped objects should + be 'what' and not 'who' in the message. + +-- gg - Merged latest set of changes for VMS. + doc/README.VMS: Update from author. + descrip.mms, vms_circlemud_gcc.opt, vms_gnuc.h: Removed. + build_circlemud.com: Almost a 'Makefile' for VMS. + comm.c: gettimeofday(): Removed VMS version, it now has it. + game_loop(): Removed output_ready() special case. + circle_sleep(): Removed special case for VMS. + sysdep.h: output_ready() removed. 'vms_gnuc.h' removed. + +8/01/99 + +-- dk - Dropped in support for socklen_t, which is in the latest POSIX + drafts and glibc2, to replace the accept_arg_t kludge. Please + verify the veracity of the changes to the OS dependent conf.h.* + files. Any platform using glibc2 or that has socklen_t won't + compile correctly using those settings. Platforms using the + 'configure' script should autodetect and work properly, although + my system is libc5 based, so it's untested. + +8/4/99 + +-- gg - doc/README.AMIGA: New update. + +8/28/99 + +-- gg - act.item.c: Fixed 'junk 83467534657834 coins' bug. + +-- gg - Released patchlevel 16. + +******** Patchlevel 17 *************************************************** + +8/28/99 + +-- gg - constants.c, structs.h: Welcome to bpl17. + +-- gg - interpreter.c: Todd A. Laycock noted + that we don't actually use ACMD(do_rent) anywhere, nor do we + even have one. + +12/14/99 + +-- gg - act.wizard.c, spec_assign,c: Fix '< top_of_world' from + Andrey Fidrya + +-- gg - modify.c: string_add(): Del + noticed a missing \r\n if people overflowed max_str on + the first line. + +12/17/99 + +-- gg - comm.c: perform_act(): "Bob Castillo" + noticed that illegal act() codes crash the MUD. Oops. + Fortunately, it only occurs due to lib/misc/socials or + aedit (the social editor) as user input is escaped to prevent + any act() codes at all. + +-- gg - act.informative.c: look_at_char(): Mob names aren't + capitalized due to \r\n prepended. + db.c: is_empty(): Crashes on NOWHERE and prevented + success by immortals. + act.wizard.c: do_return(): When disconnecting someone + upon return, make sure to not trash our own connection. + act.wizard.c: do_dc(): Needed to fix a case when + disconnecting people not in the game. + All spotted by "Andrey Fidrya" + +12/31/1999 + +-- dk - ChangeLog dates are now Y2K compliant! And just in the nick of + time! Thanks to all the COBOL hackers that brushed off their + cobwebs and worked around the clock to fix it. + +01/01/2000 + +-- dk - Happy New Year and Ante-Millennium. + + +01/14/2000 + +-- dk - comm.c: Changed some 'int's to 'socket_t's. That's what it's + there for, so that's what we'll use it for. (Why didn't anyone + else notice this?! Bizarre.) + +1/20/2000 -- See, I told you. + +-- gg - house.c: Removed a lot of '< 0' == 'NOWHERE' assumptions. + +-- gg - comm.c: Having a $ as the last character on the line + could do bad things since bpl4. Found by Bob + Castillo . + +1/23/2000 + +-- gg - house.c: Removed a lot of '>= 0' != 'NOWHERE' assumptions. + Del noticed I missed those. + +-- gg - comm.c: process_input(): Fixed the fact we write too much + to memory in the input buffer. Found by Bob Castillo + since it's much more noticeable in an unsigned variable. + +-- gg - comm.c: echo_on(): We don't need NAOFFD or NAOCRD, they + cause us problems, and others don't use them either. + +-- gg - db.c: file_to_string_alloc(): 'using' is a keyword in C++. + +-- gg - Batch of Rick Glover reports: + act.comm.c: do_spec_comm(): Use switch instead of if..else. + db.c: count_alias_records(): Don't count empty aliases. + parse_object(): in_room=NOWHERE is superfluous. + interpreter.c: nanny(): CON_CLOSE is possible. + +-- gg - Released patchlevel 17. + +******** Patchlevel 18 *************************************************** + +1/23/2000 + +-- gg - constants.c/structs.h: Welcome to bpl18. + +-- gg - Makefile.lcc: Remove some constants I have to change every patch. + +-- gg - doc/README.CYGWIN: bpl17 -> bpl18 + +7/3/2000 + +-- gg - doc/license.doc: Add copyright information that seems lacking + elsewhere. + +-- gg - build_circlemud.com: Update from author. + +-- gg - utils.h: -1 => NOBODY/NOWHERE/NOTHING cleanups. + +-- gg - spells.c: spell_teleport(): No teleporting into ROOM_GODROOM. + +-- gg - spec_procs.c: Restrict pets to NPCs. + +-- gg - interpreter.c: is_abbrev(): s/returnss/returns/ + +-- gg - handler.c: affect_join(): Keep 'next' pointer for extracted + objects in list. + +-- gg - act.wizard.c: perform_immort_invis(): Remove redundant + IS_NPC check. + +-- gg - utils.c: basic_mud_log(): Cancel message if stream hasn't + been initialized. + +7/7/2000 + +-- gg - utils.c: mudlog(): log(var) => log("%s", var); to avoid + interpreting %% codes. + +-- gg - db.c: parse_object(): Print the offending character. + check_object(): Drink aliases should last now. The code + to remove the aliases shouldn't care where it is, though. + +-- gg - act.item.c: name_from_drinkcon()/name_to_drinkcon(): + Much more intelligent support for removing/adding the + drink name to containers. + +-- gg - lib/world/obj/0.obj: An extra ~ escaped the removal of + object #99. + +10/27/2000 + +-- ae - act.informative.c: Fixed do_time() with the fix submitted by Nate + Winters that corrected the output on the 11th, + 12th, and 13th of a month (it used to output '11st', '12nd', and + '13rd'. Not so good really. + +11/3/2000 + +-- gg - shop.c: Del noted the + 'show shop' header was at the bottom of pages. + +-- gg - utils.c: get_line(): "Andrey Fidrya" + has files without a \n on the last line. + +11/15/2000 + +-- gg - act.other.c: do_quit: !GET_INVIS_LEV is redundant. + +9/18/2000 + +-- ae - comm.c: Added in $u and $U act() codes to perform_act(). These allow + the user to uppercase the first letter of the previous ($u) or next + ($U) word. For example, from the social for 'snarl': + $n snarls angrily at $N. $e$u seems incapable of controlling $mself. + $n snarls viciously at you. $U$s self-control seems to have gone bananas. + In the old style, these would have come out as: + George snarls angrily at Daniel. he seems incapable of controlling himself. + George snarls angrily at you. his self-control seems to have gone bananas. + In the new, we get: + George snarls angrily at Daniel. He seems incapable of controlling himself. + George snarls angrily at you. His self-control seems to have gone bananas. + This comes a little bit closer to proper sentence output and looks + much nicer to boot. + +12/07/2000 + +-- ae - Removed some 'offensive' language from act.item.c and magic.c. + +1/17/2001 + +-- gg - db.c: load_zones(): More accurate counting based in part + on suggestions by Rick Glover. Also added SYSERR. + +-- gg - act.offensive.c: do_order(): No "order followers". Based + on reports from Andrey Fidrya. We'll need similar fixes + for other areas and can turn it back on then. + +-- gg - db.c: file_to_string(): Check for empty files or we corrupt + memory. From "Bob Castillo" . Also + took care of duplicated feof() test. + +1/25/2001 + +-- gg - spells.h, magic.c, spell_parser.c, constants.h, constants.c: + spell_wear_off_msg[] died. It moved to spell_info[] and I + fixed 3 mispelings in the process. (That was on purpose.) + +-- gg - Makefile.in: magic.c depends on constants.h + +-- gg - comm.h: Move PAGE_(WIDTH|LENGTH) from modify.c for computations + using page_string(). Needed by the shop code. + +-- gg - mobact.c: Fixed MOB_AGGR and MOB_AGGR_TO_ALIGN logic. Any + aggressive mobs also aggressive_to_alignment weren't properly + attacking everybody, just the alignment. + +-- gg - objsave.c: Crash_load(): Plurality. + +-- gg - structs.h: Formatting and comment adjustment on CON_ and MOB_. + +-- gg - comm.c: close_socket(): Make "closing link" message accurate. + +-- gg - generic_find(): Fix for '2.bread' with one on the ground and + one in your inventory. + +-- ae - spec_procs.c: Added a CAN_SEE() check into npc_steal() to stop mobs + with the thief special from stealing from people that they can't even + see. Reported by Vladimir Prelovac + +1/26/2001 + +-- ae - act.other.c: Shifted the checking for duping into extract_char(). I + was toying and discovered that renting out skips all of the dup checks + that we had in and so does dieing. Whoops. Also, we were setting the + state of the descriptor to CON_DISCONNECT when that state is used + everywhere else for players that have the state of CON_PLAYING, so I + changed that to CON_CLOSE. (also note 'handler.c') + +2/18/2001 + +-- gg - comm.c: perform_socket_read(): Handle ECONNRESET by booting + the person as we do for a 0 length read. + +3/4/2001 + +-- gg - db.c, db.h: fread_string(): Doesn't modify 'error'. + +-- gg - util/shopconv.c: fread_string(): Fix horrible buffer overrun + as well as making the return codes not pretend to be ok. + +-- gg - shop.c: read_shop_message(): Fix think-o on fread_string's + string parameter. + +-- gg - handler.c: get_obj_vis(): Make sure 'number' isn't NULL. + extract_char(): Extensively rearranged. + +-- gg - handler.c: get_obj_vis(): Really support numbering. + +-- gg - act.wizard.c: find_target_room(): Cleanup and extend to + find location of objects worn or carried. + +-- gg - db.c: load_zones(): Skip first 3 lines to avoid mistaking + zone name for a command. + +-- gg - boards.c: init_boards(): -1 => NOTHING + +-- gg - comm.c: game_loop(): Use RL_SEC more. + heartbeat(): More PULSE_* constants. + +-- gg - structs.h: PULSE_* constants, OPT_USEC explanation. + +-- gg - handler.c: extract_char(): Should only be one switch + target, abort on finding it. Also adjusted comment. + +3/10/2001 + +-- gg - class.c: invalid_class(): Reformatted so people + can actually read it. + +-- gg - utils.h: ANA/SANA: No 'Y'. (Compare to 'AN') + From: Peter Ajamian + +3/18/2001 + +-- gg - handler.[ch], structs.h, comm.c, act.offensive.c, + fight.c: New delayed extraction sequence to avoid + dangling pointer crashes. + +-- gg - Released patchlevel 18. + +******** Patchlevel 19 *************************************************** + +3/18/2001 + +-- gg - constants.c, structs.h, Makefile.lcc, doc/README.CYGWIN: + Welcome to bpl19. + +5/1/2001 + +-- ae - Changed some '256' notes to READ_SIZE (db.c) or MAX_INPUT_LENGTH + (mail.c and handler.c). These are to keep the consistency across + functions, etc. + +-- ae - act.item.c: Removed a check for too many objects from the beginning + of do_get(). As pointed out by Vladimir Prelovac + , + 1. If there isn't anything to get you still get that message + 2. The check is already made at the appropriate time in all the other + functions that do_get() calls (in can_take_obj()). + +-- ae - constants.c: We forgot the string for the NOTDEADYET flags. Oops. + Added in 'DEAD' (with comments) for completeness. + +5/8/2001 + +-- ae - Makefile.in: Modified makefile (and added htmlheaders/footers) to + allow for cxref data creation more readily. + +5/9/2001 + +-- ae - Del submitted a 'bug' (wording problem) with a chunk in + act.movement.c that has to do with ROOM_TUNNEL. There are two + options for fixing it, so I chose the middle ground: adding a + config variable for it to config.c. This variable (tunnel_size) + indicates how large the tunnel is and defaults to 2. + +5/10/2001 + +-- ae - act.wizard.c: Added in code to remove holylight, syslog, and + nohassle when wiz+ are demoted below level 31 with do_advance(). + +-- ae - fight.c: If we don't have a fight message to send (ie, suffering, + poison, etc), then don't send the colours, and don't try to send + the message that we don't have. Reported by Andrey Fidrya + + +-- ae - db.c: This fixes a possible overflow problem in pfiles by truncating + the description if it is too long. Reported by Andrey Fidrya + + +-- ae - We had a reference to SKILL_PUNCH (#136), but in the base code, + 'punch' is an action, not a skill. Not only that, but we don't + even reference it in the lib/ anywhere. (spells.h, spell_parser.c) + +5/16/2001 + +-- ae - coding.doc: Added in a section 4 (special procedures) that was + submitted to us ages ago by Luis Pedro Passos Carvalho + . Unfortunately, due to problems with the CDP, + it languished. We just have to remember to keep the text when we + get the CDP up and running again. + +5/18/2001 + +-- gg - Global: IS_OBJ_STAT -> OBJ_FLAGGED for consistency with + MOB_FLAGGED and OBJ_FLAGGED. + +-- gg - Global: Moved a bunch of global variables to db.h. + +-- gg - act.informative.c, db.c, handler.c, interpreter.c, mobact.c, + random.c: Remove 'register' keyword, let the compiler figure + out what is best. + +-- gg - castle.c: Fix "zones are 100 rooms" assumption. + +-- gg - class.c: Fix trailing comma in prac_params[]. + From: Del + +-- gg - constants.c: Fix "the Day of the Great Gods" capitalization. + From: Carlos Myers + +-- gg - mail.c: scan_file(): Mail file is binary, open as such. + From: Marc Lank + +-- gg - interpeter.c: ACMD(do_info) and ACMD(do_offer) don't exist. + From: Del + +-- gg - magic.c: mag_points(): Rename 'hit' to 'healing' to avoid + the function named hit(). + +-- gg - shop.c: Added missing read_shop_message() declaration. + +-- gg - shop.h: Removed unused GET_OBJ_NUM() macro. + +-- gg - utils.h: Remove IF_STR(), make OBJWEAR_FLAGGED use the + GET_OBJ_WEAR information. + +-- gg - act.item.c: Removed superfluous '*next_obj'. (See the + function variable declaration section.) + +-- gg - act.wizard.c, db.c, db.h: Removed the stupid + "zone number * 100 = starting room" assumptions. + + ||| ----- ----- ----- NOTE ----- ----- ----- NOTE ----- ----- ----- ||| + + This now means you can have zones spanning anywhere, including over + each other. You can have zone #5 going from room 1354 to 2139. + That doesn't prevent zone #10 from going from 936 to 1734. We DO + NOT check for overlap. Why? Because it can be useful. No longer + are you restrained to having a zone repopulate when no one is in + the whole place, now you can do room by room (up to the limit of + 32,767 zones) for some places within a zone. In short, you no + longer have to think of a "zone" in the same way any longer. Now + it's simply a collection of loading commands for mobs/objs when a + timer fires and/or no one is in it. + + ||| ----- ----- ----- NOTE ----- ----- ----- NOTE ----- ----- ----- ||| + +-- gg - castle.c: Fixed zone*100 assumptions. + db.c: Added real_zone() for castle changes. + Changed -1's in real_mobile and real_object appropriately. + +-- gg - comm.c: close_socket(): Move NULL assignment up to fix mobile switching + problem upon disconnection. (The switched into mobile still "busy" even + though you reconnect after a drop.) + +-- gg - comm.h: USING_LARGE/USING_SMALL: Not used, removed. + +-- ae - zone file update: The zone files were all updated to suit the top + and bottom indicators put into the code. + +-- gg - db.c: load_zones(): See warning: + + ///// WARNING \\\\\ + The powers-that-be decided to change the format of the zone files + to be more reasonable with the 'bottom room' number. + + TopRoom Lifespan ResetMode => BottomRoom TopRoom Lifespan ResetMode + + Stock zones will be updated but you will need to change your own + zones by hand or your MUD will error out and not restart. + \\\\\ WARNING ///// + +-- gg - graph.c: VALID_EDGE prototype. + +-- gg - act.informative.c, constants.c, constants.h: where[] -> wear_where[] + +5/22/2001 + +-- ae - class.c: changed 'return 1', and 'return 0' to 'return TRUE' and + 'return FALSE' respectively. This brings it into the same context + as some of the other similar functions. + +5/23/2001 + +-- gg - act.item.c, act.wizard.c, handler.c, handler.h: Fix missing number + (5.Y) support for equipment due to generic_find() fix. + +6/14/2001 + +-- gg - utils.c: dice(): Use number(). + number(): Add rand() comment. + +-- gg - comm.c: init_game(): Save the MUD time on shutdown. + db.c: reset_time(): Load beginning time from lib/etc/time. + db.h: TIME_FILE: "lib/etc/time" + utils.c: mud_time_to_secs(): New. + +-- gg - db.c: interpret_espec()/parse_espec(): Finalize behavior + of Boolean options. (i.e., don't crash) + +-- gg - db.c: parse_mobile(): Clear MOB_NOTDEADYET flag on load. + +-- gg - act.informative.c: sort_commands(): YUCK! Removed the + wacky sorted command structure in favor of a new + one both smaller and more to the point. Also + killed YetAnotherBubbleSort(tm) in the process. + ACMD(do_commands): Your brain will no longer stare at + the 'if' statement and go 'Duh?'. Also fixed an + extra \r\n pair on even multiples of 7. + +-- gg - act.offensive.c: ACMD(do_order): Del + spotted an apparent left-over from Diku, 'org_room'. + Other than 'order followers cast 'teleport' leader', + I'm not sure what it was supposed to do...but it's + gone now. + +-- gg - boards.c: Board_display_msg()/Board_remove_msg(): Use + !is_number instead of !isdigit to prevent commands + like 'remove 2.ring' from affecting the messages on + a board instead. + +-- gg - objsave.c: Crash_idlesave(): Make the GET_EQ() loop match + the one in Crash_crashsave(), instead of saving the + first object in your inventory for every object you + currently had equipped. + +-- gg - db.c: parse_simple_mob(), parse_mobile(), parse_object(): + Use more macros wherever already defined for them. + +-- gg - objsave.c: Crash_delete_crashfile(), Crash_clean_file(), + Crash_listrent(): If we can't read the rent_info + information, punt early before we use garbage. + Also fixed yet another '> -1' => NOTHING issue. + +-- gg - act.wizard.c: do_stat(): 'stat file character' isn't on + the character list; use extract_char_final(). + +-- gg - act.informative.c: do_examine(): Fix not being able to + examine the inside of a 2.foo container. + +-- gg - handler.c: extract_pending_chars(): O(n^2) -> O(n) + +6/25/2001 + +-- ae - handler.c: we forgot to add GET_CHA to affect_total(), noted + by Del . + +-- ae - autorun: Peter Ajamian submitted a new autorun that is much more + configurable and robust. Information on it is contained + autorun.README and the old autorun is still available as + autorun.sh + +6/26/2001 + +-- ae - db.c: Changed the order of the available zone commands in + load_zone() to match the order of the switch statement + in reset_zone(). This makes it easier to double check + the lists against one another. Also added a comment to + each location pointing out that additions need to be made + to both locations if a new zone command is added. + +6/27/2001 + +-- ae - act.wizard.c, class.c: Todd Laycock + pointed out that with some 'careful' use of the advance + command at the wrong time, people could end up snooping + those of a higher level, and possibly introduce a nice + little 'snoop loop'. The addition of a 'snoop_check()' + routine that checks for higher/equal levels of snoopers + or snoop_bys and stops snooping if this is found was + introduced and is called from advance_level(). + +-- ae - shop.c: Rick Glover pointed out that the code + in shopping_list() would rarely (if ever) give the correct + results if someone was listing for an object and none were + found. This code chunk got rewritten and a check for any + objects found was added. + +-- ae - *.c: Reformatted code to match what we do elsewhere (ie rather + than 'struct blah * data', we generally use + 'struct blah *data'. + +-- ae - modify.c: Peter Ajamian submitted a patch + that would fix the occasional strange behaviour of the + prompt sometimes overwrites the last line of paged text in + compact mode. + +-- ae - mail.c: The postmaster will no longer allow you to send mail to + deleted characters. This is done with a check called + mail_recip_ok() which loads the character (if he exists) and + checks for the PLR_DELETED flag. Other checks can be added + as desired. Noted by Bob Castillo + +-- ae - handler.c: Andrey Fidrya pointed out that + while we check to ensure that a mob's prey is still in + the world, that memory has the potential to be reassigned + when the prey leaves the world. As such, in the + extract_char_final() routine, we scan the world for those + hunting the char being extracted and stop the hunt. + +-- ae - act.wizard.c: In the continuing series of bugs reported by + Andrey Fidrya , 'stat file ' + (when done on a player in-game) will turf his objsave + file. Anyhow, the pfile should be the same as the in-game + character regardless, so we may as well just stat the + character and avoid the rent eating problem entirely. + +7/1/2001 -- gcc 3.0 warning day. Part 1. + +-- gg - act.informative.c: Prototype sort_commands_helper. + +-- gg - comm.c: main(); db.c: parse_room(), fread_string(): + Fix bad usages of variable argument functions. + +-- gg - act.informative.c: do_users(): Fix up 'format' usage so it's more + concise and gcc can check the arguments to sprintf(). + +-- gg - ChangeLog: Fix bpl12 being released twice. + +-- gg - ban.c: do_ban(): Change to allow gcc to check arguments to + variable argument functions. + +-- gg - comm.c, utils.h: Move mud_time_to_secs() prototype. + +7/11/2001 + +-- gg - comm.c: Must not ever do function calls from an interrupt + handler without making sure every function they call are + reentrant. Think of the server as multi-threaded for it. + +7/24/2001 + +-- gg - db.c: Remove useless 'rec_count' increment. + +7/26/2001 + +-- gg - handler.c: extract_pending_chars(): Avoid free()'d memory + when a chain of people die. + +-- gg - comm.c, db.c: Save MUD time every 30 minutes and at + shutdown using save_mud_time(). + +8/2/2001 + +-- gg - comm.c: new_descriptor(): Useless memset() removed. + +8/14/2001 + +-- gg - act.informative.c: show_obj_to_char(): Die! Die! Die! + All callers updated to new SHOW_OBJ_{LONG,SHORT,ACTION} + mode parameters. + show_obj_modifiers(): Split out of show_obj_to_char() + for stuff like "(invisible)" and "humming sound." + act.comm.c, structs.h: MAX_NOTE_LENGTH moved. + +-- gg - Released patchlevel 19. + +******** Patchlevel 20 *************************************************** + +8/29/2001 + +-- gg - src/Makefile.lcc, doc/README.CYGWIN, src/structs.h: bpl19 -> bpl20 + +-- gg - src/structs.h: shop_rnum, shop_vnum + +-- gg - fight.c: compute_thaco(): New function split out of hit(). + General: Gratuitous () removal. + hit(): Made hit/miss logic easier to follow. + +-- gg - act.informative.c, act.item.c, act.other.c, act.wizard.c, class.c, + db.c, limits.c, objsave.c, olc.c, shop.c, spec_procs.c, utils.c: + Remove redundant casts. + +-- gg - shop.c: Clean up buffer sizes, use NULL and '\0' where + appropriate, redundant cast removal, remove + gratuitous parentheses. + +-- gg - General: SPECIAL() and ACMD() generally assume their argument is + writable and MAX_INPUT_LENGTH large so give an empty + temporary buffer to scribble on. + +-- gg - act.wizard.c: Prototype snoop_check(). + mail.c: Prototype mail_recip_ok(), merge two 'local functions' + sections, 'const char *name' for mail_recip_ok(). + db.c, db.h: load_char(): 'const char *name' + interpreter.c, interpreter.h: find_name(): 'const char *name' + +9/13/2001 + +-- ae - world/mob/186.mob: mob #18610 had a flag problem -- too many flags + that didn't exist. Reported by Vladimir Nano + + +-- gg - shop.c: shopping_buy(): sprintf -> strcpy. + +-- gg - db.c: check_bitvector_names(): New, checks for invalid bits set. + check_objects(): Use check_bitvector_names(). + parse_mobile(): Check bitvectors loaded. + Various: More GET_OBJ_* macros. + constants.c: Count number of array entries for later checking. + +10/1/2001 -- George's e-mail backlog clearing day. + +-- gg - act.wizard.c: do_restore(): Don't set the skills of a do_restore'd + mobile. Noted by Albert Brauneis . + +-- gg - db.c: file_to_string_alloc(): Be nicer when trying to load text + files that people are reading. Idea from Peter Ajamian. + +-- gg - handler.c: create_money(): Don't be so repetitive. At least until + a variable argument strdup() function exists. Suggested by + Axiem j'Terre . + +-- gg - act.movement.c: do_doorcmd(): Do SET/REMOVE instead of TOGGLE to + avoid exacerbating any unsynchronized door problem. Suggested by + Del . + +-- gg - Everywhere: xxx->in_room => IN_ROOM(xxx) + +-- gg - class.c: title_female(): Extra implementor level removed as noted + by Julian Buckley. + +-- gg - interpreter.c: nanny(): Remove extra echo_on(). Noted by + Del + +10/15/2001 + +-- gg - shop.c: ok_damage_shopkeeper(): Charmed shopkeepers aren't attack + exempt. Set the shopkeeper MOB_NOCHARM if you don't want it in + that situation in the first place. + +-- gg - spells.c: spell_charm(): Charisma-based spell duration. + +-- gg - mobact.c: mobile_activity(): Check charmed follower limits and + "leash" any mobiles with memory based on master's charisma. + +10/20/2001 + +-- gg - mobact.c: Fix check to make sure we have a 'snarl' social. + +-- gg - spec_procs.c: Reformatting. Change 0/1 to FALSE/TRUE. + snake(): Fix poison frequency bug. + cityguard(): Charisma modifications. Chris Epler's idea. + +10/21/2001 + +-- gg - lib/world/{obj,zon}/: Various extraneous spaces, ~, and $ removed. + +11/12/2001 + +-- ae - lib/world/shop/: Changed the shops from using hard-coded values for + the item types to using the existing support for keywords. + Also added a small (and dirty) conversion script written by + gg to convert homegrown shops. (shop-convert.pl) + +11/14/2001 + +-- ae - lib/world/shop: 30.shp, 54.shp: Removed Uncle Juan's shop (3008). + He still exists in the mob file (3008) and the items he sold + still exist (3012, 3013, 3014), but his shop and room (3056) + don't. Fixed an erroneous room in shop 5433, it had the wrong + room listed therein. + +-- gg - db.c: file_to_string_alloc(): Check showstr_count, not showstr_vector. + modify.c: show_string(): NULL showstr_vector after free(). + +-- gg - shop.c, shop.h: shop->in_room should be room_vnum, not room_rnum. + Stupid mixing of terminology! + shop.c: ok_shop_room(): 'room' is a room_vnum. + +11/15/2001 + +-- ae - shop.c: SHOP_FUNC() in shopkeeper special should call the function + with argument (which is passed to it), not 'arg' (which is a + global, and as such, going away). Reported by Rich Paret + . + +-- ae - act.wizard.c: snoop_check() assumes a link exists. It shouldn't. + Reported by Kras Kresh . + +11/24/2001 + +-- gg - sysdep.h: New configurable CIRCLE_GNU_LIBC_MEMORY_TRACK. + comm.c: main(): Call 'mtrace()' if C_G_L_M_T (see above) is on. + Call destroy_db() when finished. + db.c: free_extra_descriptions(), destroy_db(): New. + reset_zone(), free_obj(): Some NOTHING/NOWHERE/NOBODY fixes. + free_obj(): Use free_extra_descriptions(). + db.h: Prototype free_extra_descriptions(), destroy_db(). + shop.h: destroy_shops(): New. + +11/26/2001 + +-- gg - comm.c, mail.h, spells.h, structs.h, utils.h: Minor quibble; + negative numbers are actually unary expressions. + +11/30/2001 + +-- ae - act.wizard.c: do_advance() had a ch and victim reversed in a flag + check. Oops. Reported by Patrick O'Laughlin + + +12/4/2001 + +-- gg - act.item.c: name_from_drinkcon(); + act.movement.c: ok_pick(); + act.wizard.c: do_at(), do_goto(), do_teleport(), do_stat_object(), + do_load(), do_vstat(), do_zreset(), perform_set(); + db.c: check_start_rooms(), read_mobile(), read_object(); + graph.c: find_first_step(); + handler.c: char_to_room(), obj_to_room(), extract_obj(), + extract_char_final(); + objsave.c: Obj_from_store(); + olc.c: do_olc(); + shop.c: shop_producing(), list_all_shops(), list_detailed_shop(); + spec_assign.c: ASSIGNMOB(), ASSIGNOBJ(), ASSIGNROOM(); + utils.h: various macros; + Final (?) batch of NOBODY/NOWHERE/NOTHING changes. + +-- gg - db.h: Export "top_of_*" variables. + +12/10/2001 + +-- ae - spec_procs.c: magic_user() special tried to cast SLEEP in combat. + SLEEP cannot be cast in combat -- changed this to POISON + instead. Reported by Jason Ziegler + limits.c, config.c: gain_exp() has a user definable bit of + behaviour to stop mortals from levelling up to immort level + if the mud admin desires. The default behaviour is to allow + this. Enough people asked how to do this so it got added. + +12/11/2001 + +-- ae - 25.obj: Fixed some keys that were demarked as food. Doh. + Reported by The Arrow + +1/2/2002 + +-- gg - act.wizard.c: do_stat(): Actually use the 'name' variable. + Reported by . + +-- gg - utils.c: number(): Duh, messed up the comment by accidently swapping + the 'from' and 'to' variables. Must've been late. + Noted by Juliano Ravasi Ferraz . + +1/10/2002 + +-- gg - db.c: renum_zone_table(): Better explanation of what it does, also + noting some assumptions it makes. Fixed to use room_rnum + instead of just 'int'. + +-- gg - utils.c: room_is_dark(): New, from the old IS_DARK() macro. + utils.h: Change IS_DARK; tweak some bounds checking on macros. + +-- gg - act.social.c: free_social_messages(): New. + ban.c: Free_Invalid_List(): New. + boards.c: Board_clear_all(), Board_clear_board(): New. + boards.h: Prototyping the above. + comm.c: main(): Big list of other memory to free on shutdown. + db.c: free_text_files(), free_player_index(), free_help(): New. + do_reboot(): Use free_help(). + db.h: Prototype the above three new functions. + fight.c: free_messages(), free_messages_type(): New. + mail.c: clear_free_list(): New. + +-- gg - castle.c: castle_mob_spec(): New. + assign_kings_castle(): Use castle_mob_spec(). + castle_virtual(): Use correct NOWHERE/NOTHING/NOBODY. + +-- gg - shop.c: read_type_list(): Handle end markers a little better. + +-- gg - castle.c: block_way(): room_vnum not room_rnum. + From Juliano Ravasi Ferraz . + +1/13/2002 + +-- gg - utils.c: get_line(): Handle \r in case the C library doesn't. + Fixes running under Cygwin which doesn't remove it. + From Patrick Dughi . + +-- gg - structs.h: Move toward unsigned index variables. Leave it as a + configuration option, defaulting to signed, for now. + +-- gg - act.wizard.c: do_purge(): Properly destroy equipment with + delayed extraction behavior. From + Juliano Ravasi Ferraz . + +-- gg - handler.c: extract_char(): Must remember the link-challenged. + +-- gg - act.other.c, act.wizard.c, class.c, comm.c, db.c, db.h, handler.c, + interpreter.c, limits.c, objsave.c: No longer twiddle the load + room in save_char(), nor pass it as a parameter. Any place + needing to change it use GET_LOADROOM. It's cleared upon login + to prevent it from sticking around forever, unless PLR_LOADROOM + is set. From Juliano Ravasi Ferraz . + +1/14/2002 + +-- ae - doc: Added the new pdf versions of the documents that have outdated + all of the prior text files. With this patch level, most of + the documents are (unfortunately) only available in PDF + format, but with Patch Level 21, they will be available in + text and html also. + +1/15/2002 + +-- gg - db.c: parse_simple_mob(): Format correct number (3) of arguments. + From Juliano Ravasi Ferraz . + +-- gg - act.wizard.c: do_teleport(): Stupid logic inversion fixed. This + was introduced in an earlier change this patchlevel. + +-- gg - act.wizard.c: do_load(): 'mob_vnum r_num'...? Fixed. Another + inter-patchlevel fix. + +-- gg - act.wizard.c: do_purge(): When clearing objects from characters, + also clear the ground afterwards. + +-- gg - ban.c: Free_Invalid_List(); + db.c: free_text_files(), free_help(), free_player_index(): + Make usable even when not shutting down. + +-- gg - act.informative.c: print_object_location(); + objsave.c: Crash_is_unrentable(): + '[<>]=? NOWHERE' is a nonsensical comparison. + +-- 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. + +******** Patchlevel 22 *************************************************** + +4/30/2002 + +-- gg - Makefile.lcc, structs.h, constants.c: bpl21 -> bpl22 + +-- gg - class.c: level_exp(): Fixed thief experience progression to be + less jumpy. Old: 10k 20k 30k 70k. + +-- gg - boards.c: find_board(): Check immortals' inventories for boards + so they can carry them around. Requires the config.c + setting 'load_into_inventory = YES' to actually be useful. + +5/1/2002 + +-- gg - shop.c: assign_the_shopkeepers(): Avoid assigning 'shop_keeper' + special procedure to SHOP_FUNC(). + From: "Kras Kresh" + +-- gg - act.movement.c: ok_pick(): Actually use dex_app_skill[].p_locks. + From: Edward J Glamkowski + +-- gg - objsave.c: gen_receptionist(): Make random actions work again. + From: "Kras Kresh" + +-- gg - house.c: House_list_guests(): Print out when all guests listed + are actually deleted instead of leaving empty "Guests:". + From: "Bob Castillo" + +5/2/2002 + +-- gg - handler.c: affect_total(): Bring affect_total() in line with + do_set()'s handling of godly statistics. + From: Edward J Glamkowski + +5/3/2002 + +-- ae - act.informative.c: do_weather(): added info on the actual numbers + for god+. + From: Edward J Glamkowski + +5/17/2002 + +-- gg - utils.c, utils.h: get_filename(): 'name' should be 'const char *'. + +-- gg - interpreter.c: nanny(): Remove aliases upon self-delete. + alias.c: delete_aliases(): New. + +-- gg - conf.h.win: Updated to new 'configure' checks. + sysdep.h: Aliases for (v)snprintf and MAX_PATH for Windows. + +5/19/2002 + +-- ae - building.tex: corrected the order of UNDERWATER and FLYING sector + types. From: nano.vladimir@slsp.sk + +-- ae - shop.c: list_detailed_shop(): A few \r\n markers were missing in the + output, specifically before the Shopkeeper:, Buys:, and + Buy at: lines. + From: Edward J Glamkowski + +6/13/2002 + +-- gg - doc/coding.doc: Beginnings of Chapter 2. + +6/17/2002 + +-- gg - doc/coding.doc: Sections 2.2.1 (partial) and 2.2.3. Some additions + to section 2.4.5. Also ran it through ispell. + +6/21/2002 + +-- gg - doc/coding.doc: Finish (?) section 2.4. Add TODO list. + +-- gg - doc/coding.doc: Finish section 2.2.2. + +-- gg - handler.h: Remove prototypes for non-existant functions: + get_obj, get_obj_in_list, Crash_get_filename. + +-- gg - comm.h: Remove prototype for non-existant function: perform_to_all. + +6/24/2002 + +-- gg - doc/coding.doc: Finish section 2.2.1. + +6/25/2002 + +-- gg - doc/coding.doc: Finish sections 3.6 and 3.7. + +6/28/2002 + +-- gg - act.informative.c: look_at_room(): Use '%s' format for rooms. + +-- gg - act.informative.c: list_one_char(): Missed a '+1' when converting + UPPER() usage. Found by Ken Ray . + +9/06/2002 + +-- ae - building.tex: Fixed a double "action bitvector" description (the + second was a typo for "affection bitvector"). + From Ken Ray + +-- ae - 30.obj: Changed the sdesc of #3003 (firebreather) to 'bottle'. + From Ken Ray + +-- ae - Various READMEs: Changed 'circle30bpl12' to be generic, and fixed some + small typos. From Julian Buckley + +9/25/2002 + +-- gg - act.other.c: do_display(); structs.h: Auto-prompt display. + +-- gg - act.wizard.c: do_wiznet(): Add missing "%s" formats in send_to_char(). + +-- gg - boards.c: Board_remove_msg(): Clear orphaned board message when + shifting the list down. Caused free() problems on shutdown. + +-- gg - comm.c: make_prompt(): Reorganization to make adding bits easier. + +-- gg - act.comm.c: do_gen_comm(): Missing \r\n at end of message. + From: "Thomas Arp" + +-- gg - act.item.c: perform_put(): Don't allow cursed items to be put into + a container not in the character's inventory. + +-- gg - comm.c: affect_update() is in magic.c, not spells.c + From: Mathew Earle Reuther + +-- gg - act.other.c: do_gen_tog(): Add 'bitvector_t' comment on variable. + From: Mike Stilson + +-- gg - act.other.c: do_quit(): Fix load room setting to virtual. + From: "The Fungi" + +-- gg - shop.c: list_detailed_shop(): Fix '>= 0' check to be '!= NOBODY'. + From: "The Fungi" + +-- gg - act.informative.c: do_where(); act.wizard.c: do_show(); + spec_procs.c: list_skills(); utils.c: sprintbit(): + 'nlen' should be 'int', to check return value of snprintf(). + From: Thomas Arp + +-- gg - shop.c: customer_string(): Loop reorganized to be cleaner and + remove a pointless use of strlcpy(). + +10/03/2002 + +-- gg - interpreter.c: perform_dupe_check(): Make immortals that have switched + into disconnected mortal bodies do a return instead of being + disconnected. Noted by: "Kras Kresh" + +-- gg - magic.c: mag_unaffects(): Make SPELL_HEAL special-case into a generic + solution instead. + +-- gg - interpreter.c: nanny(): Destroy d->character if player answers 'N' to + "Did I get that right?" prompt. There may be lingering + information from a deleted character. + From: "Kras Kresh" + +-- gg - shop.c: shopping_list(): Only display "none of those found" message + if actually asked to search for an object. + From: "Ken Ray" + +-- gg - comm.c: game_loop(): Change handling of process_output() and + ->has_prompt. + vwrite_to_output(): Truncate text to fit on overflow instead + of throwing it away. + write_to_descriptor(): Return number of bytes written. + process_output(): Keep data on socket write block. + +******** CircleMUD 3.1 *************************************************** + +11/15/2002 + +-- gg - comm.c: echo_on(), echo_off(): "%s" format strings, though not + necessary. + make_prompt(): Revert changeset #1.115. + process_output(): Cast 'result' to avoid unsigned warnings. + +-- gg - structs.h: Force 'byte' to signed char. Some platforms use + an unsigned char by default. + +-- gg - limits.c: gain_condition(): Cosmetic return -> break change. + +-- gg - lib/text/credits: Added Alex Fletcher, George Greer, and Daniel + Koepke. Changed jelson@ address to cdev@. + +-- gg - shop.h: Make it more obvious the WILL_* #define values are + bitvectors and not simply counting. + From: Carlton Colter + +-- gg - comm.c: process_output(): Correctly switch to large buffer + when text would just barely fit in the small buffer + then forget to change. + From: Yoram Harmelin + +-- gg - cnf/configure.in, cnf/aclocal.m4: Added -fno-builtin detection + to fix prototype testing. Functions such as bzero(), + printf(), and fprintf() were receiving false negatives. + configure: Regenerated. + +11/17/2002 + +-- gg - utils.h: Make TOGGLE_BIT "x^=y" instead of "x=x^y" to avoid + a VC++ warning. + +-- gg - house.c: House_delete_file(): Make 'vnum' a 'room_vnum' type. + +-- gg - castle.c: castle_mob_spec(): Use 'mob_vnum' type. + +-- ae - Updated docs, and added coding.tex/coding.pdf + +-- gg - autorun, autorun.cmd, autorun.pl, autorun.sh: Remove '3.0' + version number, to avoid needing to update it. + +-- gg - Makefile.lcc, constants.c, structs.h: bpl22 -> 3.1 + +-- gg - Makefile.amiga, Makefile.arc, Makefile.in, Makefile.lcc, Makefile.msvc, + Makefile.os2, Smakefile, magic.c, structs.h, Makefile.in: + Remove '3.0' version numbers to avoid updates. + +-- gg - util/Makefile.in: Remove '3.0' version numbers to avoid updates. + +-- gg - lib/world/README: Remove '3.0' version numbers to avoid updates. + +-- gg - lib/text/greetings, lib/text/imotd: Change 3.0 to 3.1. + +-- gg - doc/README-NOW: Deleted. + +-- gg - doc/README.AMIGA, doc/README.ARC, doc/README.BORLAND, doc/README.CYGWIN, + doc/README.MSVC4, doc/README.MSVC5, doc/README.MSVC6, + doc/README.OS2, doc/README.UNIX, doc/README.VMS, + doc/README.WATCOM, doc/README.WIN: Remove '3.0' version numbers + to avoid updates. diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..5398119 --- /dev/null +++ b/FAQ @@ -0,0 +1,1431 @@ +WARNING: THIS FAQ IS OUT OF DATE + Please reference the FAQ in the doc/ directory of the distribution + instead. It is significantly more current. + + +Frequently Asked Questions (FAQ) for Circle DikuMud with Answers +Alex Fletcher, furry@circlemud.org + +This file is intended to cover common questions related to the CircleMUD +distributon source by Jeremy Elson (http://www.circlemud.org/~jelson/) and +not general DikuMUD questions. Any contributions and corrections are more +than welcome. It is currently maintained by Alex Fletcher (aka Furry) +. Please direct corrections to this address. The +original author was Ryan Watkins (aka VampLestat). More information about +CircleMUD, including up-to-date versions of this documentation in ASCII and +Postscript, can be found at the CircleMUD Home Page +(http://www.circlemud.org/) or FTP site +(ftp://ftp.circlemud.org/pub/CircleMUD/). + +______________________________________________________________________ + +Table of Contents + +1. Introduction + + 1.1 I've never played a MUD before. What should I do? + + 1.2 I'm new to C and/or coding. What do I do? + + 1.3 I want to build my own MUD. Where do I start? + + 1.4 What is CircleMUD? + + 1.5 What is the history of CircleMUD? + + 1.6 Where is the original CircleMUD so I can check it out? + + 1.7 Will the CircleMUD creators visit my mud? + + 1.8 What is UNIX? + + +2. Resources + + 2.1 Where do I find the source code for CircleMUD? + + 2.2 Where do I find areas, etc. for CircleMUD? + + 2.3 I have questions about CircleMUD. Where should I go? + + 2.4 How do I subscribe/unsubscribe to the Mailing List? + + 2.5 To what platforms has CircleMUD been ported? + + 2.6 How can I submit code or areas for use with CircleMUD? + + 2.7 How do I use a patch file and how can I make one? + + +3. Compiling CircleMUD + + 3.1 Why do I get many syntax errors with Sun's ``cc'' compiler? + + 3.2 Why do I get all sorts of errors with ``crypt'' functions and header files? + + 3.3 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? + + 3.4 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 linux/ and asm/ directories. What can I do? + + 3.5 I'm getting compilation errors from a header file, and I didn't even + change it? + + 3.6 I'm trying to compile the MUD on Windows '95 and am having problems, + what can I do? + + 3.7 How can I do a ``grep'' on Windows 95? + + 3.8 While compiling the MUD, why do I get errors like ``foo.c:1231: + Undefined symbol `_whereamI' referenced from text segment'' + + 3.9 What is a parse error and how do I fix it? + + 3.10 I have this piece of code that calls bcopy(), bzero(), and bcmp() + and it won't compile, so what can I do? + + 3.11 My compiler doesn't have ``strdup()'', what can I do? + + 3.12 I am having trouble with my ``makefile'', what could be the problem? + + 3.13 How can I handle directories in C? + + +4. Running CircleMUD + + 4.1 I typed ``autorun'' but then my terminal just froze. + + 4.2 I typed ``bin/circle'' and got lots of boot messages, but then it + said ``Entering game loop'' and froze. + + 4.3 Okay, I think the MUD is running but why don't I get a login prompt? + + 4.4 How come I get this error when running my MUD: ``Error reading board: + No such file or directory'' + + 4.5 I just got this SIGPIPE, what is it and what Can I Do About It? + + 4.6 When I run Circle under Linux, it tells me ``gethostbyaddr: + connection refused'' when the MUD boots, and then dies. Why? + + 4.7 When I run Circle under Windows 95, it tells me ``Winsock error + #10047'' when the MUD boots, and then dies. Why? + + 4.8 When I run Circle under Windows 95, players can't rent---their + equipment is just dropped on the ground, syslogs don't work, so what + is the problem? + + 4.9 When someone logs on to my Windows 95 MUD, the console screen gives: + ``gethostbyaddr: No such file or directory'' + + 4.10 My MUD crashed and my connection got closed. What can I do? + + 4.11 Ok, so how do I use ``gdb''? + + 4.12 How can I hunt bugs more effectively? + + 4.13 I just added n levels to my MUD (from the stock 34). How do I set + my imps up to level n without a pfile wipe? + + 4.14 I decided to wipe my pfile away anyway. What steps should I take to + do this? + + 4.15 I want to expand the ability to pk in my MUD, allowing ASSASSINS + that'll be able to PK without getting flagged. How can I do this? + + 4.16 Why does it say ``Connection closed by foreign host.'' and not + display the ``Byebye!'' message I'm trying to send before cutting + someone off? + + 4.17 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? + + 4.18 How do I get the CircleMUD to autoload when the Linux server is + restarted? + + 4.19 My server shuts down my MUD everytime I logoff. How do I keep the + MUD running when I logoff? + + +5. Code Changes for CircleMUD 2.20 + + 5.1 How do I fix the bug where people can junk more coins than available? + + 5.2 How do I fix the ``vstat'' bug that crashes the MUD? + + 5.3 How do I fix the ``wizlock'' bug that lets lower immortals lock out + higher immortals? + + 5.4 How do I fix the ``mudlog'' bug that lets people see me log in, even + if I'm wizinvis? + + +6. CircleMUD 3.0 Questions + + 6.1 Are there any bugs in patch level 19? + + 6.2 How do I access Online Creation? + + 6.3 How does the new bitvector system work? + + 6.4 When will the production release of Circle 3.0 be? + + 6.5 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. + + 6.6 Why does CircleMUD use BUF switches all through the code, what's + happening here? + + 6.7 How do I add a new class? How do I add more levels? + + 6.8 Is there a complete ``coding.doc''? + +______________________________________________________________________ + +1. Introduction + + +1.1. I've never played a MUD before. What should I do? + +Don't 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 +at: + +http://www.mudconnect.com/ + +The CircleMUD web server also has a smaller CircleMUD Site List at: + +http://www.circlemud.org/sites.html + + +1.2. 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 ambitous project to start +with. That's 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. 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 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. Then 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 isn't all that difficult, just examine the class code in class.c and +the CON_QCLASS block in interpreter.c, cut, paste, and modify. Also look at +structs.h, for "#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. + + +1.3. 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: + +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. + +Read the FAQ. MUD Experience doesn't help a huge amount. Code experience +does. + +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? + +By checking the FTP Site under contrib. +(ftp://ftp.circlemud.org/pub/CircleMUD/contrib). Learn a lot from there. +Learn from the Snippets page (http://developer.circlemud.org/snippets/), and +*know* the FAQ. + +Also, is there anything that I should know about CircleMUD being a "newbie" +to it? + +See the above comment. + + +1.4. What is CircleMUD? + +CircleMUD is a DikuMUD derivitave, developed by Jeremy Elson + 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 it cannot be used to make money in ANY way, +the original developers' names must be in the login screen and that the +credits command always presents the same information, etc. + +Quoting from CircleMUD's release.doc: + + "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." + + +The latest full release of Circle is 2.20, released on November 17, 1993. +Currently 3.0 is in beta, at patch level 19, released on August 14, 2001. + + +1.5. What is the history of CircleMUD? + +o Version 2.00: July 16, 1993 +o Version 2.01: July 20, 1993 +o Version 2.02: Early August +o Version 2.10: September 1, 1993 +o Version 2.11: September 19, 1993 +o Version 2.20: November 17, 1993 + +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 Jeremy gets it done, and it will be announced +on the mailing list and the newsgroup rec.games.mud.diku. + + +1.6. Where is the original CircleMUD so I can check it out? + +CircleMUD is a public code base, freely distributable, but the author of +Circle doesn't actually run one personally. There used to be CircleMUD, and +while Jeremy Elson continues to develop it, there is no original CircleMUD +any more. To see other MUDs that are using the CircleMUD code base, check +out this Site List: http://www.circlemud.org/sites.html + + +1.7 Will the CircleMUD creators visit my mud? + +While there is a possibility that one (or more) of the CircleMUD creators +will drop by your MUD for a visit, to play, or to simply look around, there +is a slim chance that they will even identify themselves. + +Would you like to see us on your MUD? You won't. We don't want free wizzes +or favours for our work here. In fact, we will state categorically that if +anyone comes on your MUD claiming to be associated with us, they aren't. + +If you want to check whether or not someone on your MUD really is one of us, +we can all be contacted by email for verification: + Jeremy Elson + Chris Epler + Alex Fletcher + George Greer + Daniel Koepke + Tony Robbins + +As an interesting side note, there are two interesting things about the +order of the addresses mentioned above: +* They are in alphabetical order by last name. +* They are in chronological order of when each person joined the + CircleMUD team. + + +1.8. 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. + + + +2. Resources + +2.1. 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: + +ftp://ftp.circlemud.org/pub/CircleMUD/ + +There is also a CircleMUD Home Page: + +http://www.circlemud.org/ + +for additional CircleMUD links and information. + + +2.2. 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: + +ftp://ftp.circlemud.org/pub/CircleMUD/contrib/areas/ (California, USA) + +Or you can use one of the CircleMUD mirrors: + +ftp://ftp2.circlemud.org/pub/CircleMUD/ (Ohio, USA) +ftp://ftp.stormhaven.org/pub/CircleMUD/ (Virginia, USA) +ftp://ftp.mono.org/pub/mud/CircleMUD/ (London, UK) + +If you cannot use FTP, you can contact one of the site maintainers and +request a file. The maintainers are: + +Alex Fletcher +Chris Epler +George Greer + +If the FTP site is down, please try one of the mirrors and then contact Alex +at his alternate address since he will be +able to find out the situation. There is also a code snippets site at: + +http://developer.circlemud.org/snippets/ + +Where a number of code suggestions and hints are located. + + +2.3. 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. + +There is also a new project, started in June of 1996, called the CircleMUD +Documentation Project (http://www.circlemud.org/~jelson/circle/cdp/) which +will eventually be a repository for all Circle-related information. It's +still being built as of this writing, but hopefully will become a valuable +resource as more documentation is added. + +If you still have questions after reading the doucmentation, you can try +asking on the CircleMUD mailing list (see next section). + +If you have a question you think is too "newbie" for the mailing list, try +the help database . Previous questions are accessible +though the bugs database (http://bugs.circlemud.org/). That is also, +incidently, where you should go to report bugs. + +You can also contact the author, Jeremy Elson . +George Greer can also be contacted for most +problems. + + +2.4. How do I subscribe/unsubscribe to the Mailing List? + +There is a CircleMUD mailing list for coders, builders, and administrators. +To subscribe, send a message to the list server +with a message body of subscribe circle . To +unsubscribe from the list send a message to with +the words unsubscribe circle as the message body. DO NOT send subscription +or 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 +(http://qsilver.queensu.ca/~fletchra/Circle/list_faq.html) for more +information. + + +2.5. 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, and others. + +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++ version 4.0 or 5.0, +Borland (now Inprise) C++ 4.5, Watcom v.11, Cygnus GNU-WIN32, LCC, Macintosh +with CodeWarrior, Amiga, and Acorn RiscOS. + +The older version of the code, Version 2.20, compiles mainly on BSD UNIX +systems but has trouble under SVR4-based systems such as Solaris. The author +has 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. + +Jean-Jack Riethoven 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 Jeremy Elson or George Greer. + + +2.6. How can I submit code or areas for use with CircleMUD? + +There is a special uploads area: + +ftp://upload.circlemud.org/pub/CircleMUD/incoming/ + +..in the CircleMUD domain for submissions of code, areas, utilities, +scripts, and anything else that might be of use to Circle users. Please +make sure only to upload to upload.circlemud.org and not any of the +CircleMUD mirrors. These portions of code or areas will probably not be +added to the full release of CircleMUD unless you make specific arrangements +with Jeremy for code items, or with Alex for area/lib files. + + +2.7. How do I use a patch file and how can I make one? + +Patch files are created and used using the ``diff'' and ``patch'' utilities, +respectively. They can both be downloaded from the GNU FTP Site +(ftp://ftp.gnu.org/pub/gnu/) under the name ``diffutils- xxx.tar.gz''. If +you happen to be using a DOS or Windows machine, you should get patch for +DOS (ftp://204.119.24.14/pub/patch/patch12.zip). This does not support long +filenames (but can be used with short filenames). There is also a set of +Windows 95 Utilities now available from the Cygnus Gnu-Win32 Project +(http://www.cygnus.com/misc/gnu-win32/). + +These are the various parameters to use with diff (all work in general on +unix based systems, but check out the help entries to be certain. + +diff -uN [original_src_directory] [altered_src_directory] > Patch + +-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 -c but it +generates much larger and harder to follow patches. + +-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. + +-r recursive, add r to the uN above if you want it to recursively add in +any subdirectories. (be careful with this one) + +-p Tells diff to indicate what function is being ``patched'' in each +section. This may not be supported by all versions of ``diff.'' + +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: + + patch -u < [patchfile] + +If the patch was created with a SYSV patcher (i.e. not a unified diff), the +patch should be added with: + + patch -c < [patchfile] + +Of course, if the instructions state otherwise, ignore any instruc- tions +given here and follow the instructions given with the patchfile instead. + +Finally, in modern patches, there are three characters of interest to note: + +o ! :: The line changes between new and old. +o + :: This line is added to the old to make the new. +o - :: This line is removed from the old to make the new. +o The rest of the lines are just there to give you an idea of where + to change. + + +3. Compiling CircleMUD + +3.1. Why do I get many syntax errors with Sun's ``cc'' compiler? + +Because Circle is written in ANSI C, and Sun's standard cc compiler isn't +capable of compiling ANSI C code. You can try acc, Sun's ANSI C compiler, +but it costs extra money to get it from Sun 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 (ftp://ftp.gnu.org/pub/gnu) and install it, if you +have enough time and space. + + +3.2. Why do I get all sorts of errors with ``crypt'' functions and + header files? + +(This information applies ONLY to Version 3.0 of the code.) CircleMUD +normally uses the UNIX crypt() function to enrypt players' passwords. +Because of export restrictions imposed by the U.S., some systems do not have +the crypt() function. ``configure'' will usually be able to figure out +whether or not your system has crypt(), but if it guesses incorrectly and +you see problems with the crypt() function or headers, you can manually +disable password encryption by going into the sysdep.h source file and +uncommenting the line that reads: + + #define NOCRYPT + +Be warned, however, that doing this causes the MUD to store players' +passwords in plaintext 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! + + +3.3. 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 Makefile that +links all the object files together into the 'circle' binary. + +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 +Makefile and search for the comment next to ``SVR4''. + +3.4. Every time I try to compile Circle (or any other piece of soft- ware) + under Linux, it gives me errors and says it cannot find include header + files in the linux/ and 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 /usr/include/linux, which are distributed separately from +the rest of /usr/include. + +The easiest way to do this if you're using the Slackware Linux distribution +is simply to install the 'K' series of disks which is the kernel source. + +Otherwise, you'll have to set up your include files manually. The easiest +way to get these is to download kernel source from: + +http://www.kernel.org/mirrors/ + +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 usr/src +/directory. It's about 13 megabytes compressed and 54 megabytes +uncompressed (For the 2.2.9 kernel). + +Read the README file that comes with the kernel, and make the symbolic links +you need for /usr/include/asm and /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 /usr/src/linux as well, in order +to make linux/config.h and other files that get generated by these steps. + +You can remove the whole kernel source tree except for include/ at +this point and get most of your 48.5 megs back. + +(Thanks to Michael Chastain for providing this answer.) + + +3.5. 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''. I think I've seen 2 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. I can't really say much beyond that, but look +for a missing semicolon, are any other errors you can find. + +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. + + +3.6. I'm trying to compile the mud on Windows '95 and am having prob- lems, + 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 +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 patch for DOS +(ftp://204.119.24.14/pub/patch/patch12.zip). This does not support long +filenames (but can be used with short filenames). + + +3.7. How can I do a ``grep'' on Windows 95? + +1. Select ``start menu''->``find''->``files or folders'' +2. Enter the files/dirs to search in. +3. Select ``Advanced'' +4. In the ``Containing Text'' input box, type in the text you want. +5. Double click on a match to bring up the file that matched. + Even better is to use MSVC's find command (if you have it). + + +3.8. 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 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. + + +3.9. 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. + + +3.10. 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: + + +#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) + + +3.11. My compiler doesn't have ``strdup()'', what can I do? + +Use Circle's built-in str_dup() function instead. + + +3.12. 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. This is how the makefile must be constructed: + +foo.o: foo.c conf.h sysdep.h structs.h utils.h interpreter.h \ + handler.h db.h +{TAB}$(CC) -c $(CFLAGS) + +To add these lines properly, you can use gcc to assist you with the +following shell script (from Daniel Koepke): + +#!/bin/sh +gcc -MM $1 >> Makefile +echo "{TAB}\$(CC) -c \$(CFLAGS) $1" >> Makefile + +To use this script, replace {TAB} with a tab, and then run the script +like: add_file foo.c + + +3.13. How can I handle directories in C? + +Note that this seems only to be valid for UNIX OSes. Handling of +directories is accomplished through the dirent.h and sys/types.h files. The +function opendir() returns a ``DIR*'' pointer (it's like 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 readdir(), +seekdir(), and scandir(). When you reach the end of the directory list, you +can either go back to the start with rewinddir() or close the directory with +closedir(). The following code (which has not been tested) should open a +directory and go through it one by one and prints the filenames: + + 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); + +The dirent structure contains only two useful elements, the file's name +(d_name) and the files length (d_reclen). + +Thanks to Daniel Koepke for the above. + + +4. Running CircleMUD + +4.1. I typed ``autorun'' but then my terminal just froze. + +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 4.3). The game will +then run unattended until you explicitly shut it down. + +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. + + +4.2. 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). + + +4.3. Okay, I think the MUD is running but why don't I get a login prompt? + +In order to play the MUD, you must connect to it using the telnet command, +i.e. ``telnet localhost 4000''. + + +4.4. 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. + + +4.5. 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 my_signal(SIGPIPE, SIG_IGN) in +signal_setup(). Where most people see the problems with SIGPIPE is while +debugging with GDB. By default, GDB responds to a SIGPIPE by stoping 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 `handle' +command. To stop the program from stoping at SIGPIPE, you would give GDB the +command `handle SIGPIPE nostop' + + +4.6. When I run Circle under Linux, it tells me ``gethostbyaddr: con- + nection 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. +The easiest way to do this if you're using Slackware is to install one of +Slackware's precompiled networking kernels. Also, make sure to install +Slackware's `N' series of disks which contains other networking support +files. + +If Slackware's precompiled kernel isn't available you'll have to compile the +kernel yourself. First make sure the kernel source is installed in +/usr/src/linux (see section 3.1.4) and follow the instructions in +/usr/src/linux/README. When you do `make config' it will ask you a series of +questions about which kernel features you want; make sure to answer ``Y'' to +``Networking support'' and ``TCP/IP support''. + + +4.7. When I run Circle under Windows 95, 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 the Windows 95 CDROM in order to copy +the drivers onto your hard drive. + + +4.8. When I run Circle under Windows 95, 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: + + CD \Circle30bpl11 + cd lib\plrobjs + mkdir A-E + mkdir F-J + mkdir K-O + mkdir P-T + mkdir U-Z + mkdir ZZZ + +Object saving should then work. 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. pl12 allows you to direct logs to a specific file instead. + + +4.9. When someone logs on to my Windows 95 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 innto 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. + + +4.10. 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. + + +4.11. Ok, so how do I use ``gdb''? + +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 bughunting notes following it: + +If you've got a core file, go to your top circle directory and type: + +> gdb bin/circle lib/core + +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: + +> gdb bin/circle + +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. + +When you've got the crash info, you can type ``where'' to see which function +called the crash function, which function called that one, and so on all the +way up to ``main()''. + +I should explain about ``context'' You may type ``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 ``up'' to go up. You start at the bottom, but once you go +up, and up, and up, you can always go back ``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). + +The ``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: + +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) + +etc.. + +Note that you can't use macros (all those handy psuedo functions like +GET_NAME and GET_MAX_HIT), so you'll have to look up the full structure path +of variables you need. + +Type ``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. + +(From Sammy ) + +For more information, you can try checking out the GDB Debugger +(http://www.dgii.com/people/robertl/skunk/gdb/gdb_toc.html) + + +4.12. 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: + +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 + +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. + +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. + +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. + +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 +print ch, you get a hex number that shows you the memory location where ch +is at. It's a little helpful, but try print *ch and you'll notice that it +prints the contents of the ch structure, which is usually more useful. +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 no ch in this +context it is because the ch variable wasn't passed to the function you're +currently looking at. + +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 _next_ line to be executed. So if the line is a = b + c;, +printing a will show you what a was before this line, not the sum of b and +c. 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 eturn 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. + +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: + +void dummy(void){} + +Put that somewhere in the file you're working on. Then, right before the +crash, put a call to dummy in the code (ex: dummy();). Then set your +breakpoint at dummy, andwhen you hit the breakpoint, step once to get back +to the crashing code. + +Now you're in total control. You should be looking at the exact line that +gave you the crash last time. Print *every* variable on this line. Chances +are one of them will be a pointer to an unaccessable memory location. For +example, printing ch->player.name may give you an error. If it does, work +your way back and print ch->player to make sure that one's valid, and if it +isn't, try printing ch. + +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 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 :) + +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. + +(From Sammy ) + + +4.13. I just added n levels to my MUD (from the stock 34). How do I set my + imps 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. + +ACMD(do_upme) +{ + if (GET_IDNUM(ch) != 1) { + send_to_char("You think IMP positions are that easy to come by? Go Figure...\r\n", ch); + } else { + GET_LEVEL(ch) = LVL_IMPL; + send_to_char("Advanced.\r\n", ch); + } +} + + +4.14. I decided to wipe my pfile away anyway. What steps should I take to + do this? + +In order: +1. Shutdown the MUD with ``shutdown die'' so that it won't restart. +2. Remove the player file, lib/etc/players +3. Restart the MUD and login to recreate your imp character. + +You should probably also remove files in plrobjs, unless you want the +recreated characters to come back with the same equipment they had when they +were deleted. + + +4.15. I want to expand the ability to pk in my MUD, allowing ASSASSINS + that'll be able to PK without getting flagged. How can I do this? + +The simple way to do this is to find all the ``pk_allowed'' checks and +replace them with a can_murder(ch, vict) function call. Prototype the +function in utils.h. Then, in utils.c, create a can_murder() function +something like this: + +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 */ +} + + +4.16. 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: + + send_to_char("Bye bye. Come back soon, ya hear?", ch); + close_socket(ch->desc); + +The close_socket immediately dispatches/closes the connection, while +send_to_char puts the message on the output queue to be dispatched next +game_loop cycle. Therefore, the socket is gone. On some systems (ie 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: + + send_to_char("Bye bye. Come back soon, ya hear?", ch); + STATE(ch->desc) = CON_CLOSED; + +This will then cycle to the next 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. + + +4.17. 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-signifigant-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: + +o Don't bother trying to move those files. +o Edit your code to always write in one format. +o Develop a binary to ascii conversion tool (and ascii to binary) for + all binary files. +o Develop an ascii read/write system to allow portability. + + +4.18. How do I get the CircleMUD to autoload when the Linux server is + restarted? + +In /etc/rc.d/rc.local find where things like sendmail and (maybe) gpm +are started. Add something like: + +cd /home/mudlogin/circlebpl19/ +su mudlogin -c ./autorun & +cd + +Of course, change the "mudlogin" to whatever the name of the account is that +normally has control of the MUD, and change the path in the first cd to +whereever the MUD is run from. + +For more info: man su + + +4.19. My server shuts down my MUD everytime I logoff. How do I keep the MUD + running when I logoff? + +Instead of typing "autorun &" to start the autorun script (which starts and +keeps the MUD running), type "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 "man nohup" at the prompt on your server. + + +5. Code Changes for CircleMUD 2.20 + +5.1. How do I fix the bug where people can junk more coins than available? + +Apprently 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: + +Around line 480 of act.obj1.c, you will find the code: + + 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; + } + } else { + .... + +It should be changed to: + + 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; + } else { + .... + + +5.2. How do I fix the ``vstat'' bug that crashes the MUD? + +To the fix for the vstat bug, from Jeremy Elson: + +In the file act.wizard.c, in the function do_vstat, in the mobile section of +the switch (around line 1150), you'll find the code: + + mob = read_mobile(r_num, REAL); + do_stat_character(ch, mob); + extract_char(mob); + +Add the line char_to_room(mob, 0) before extract_char(), like this: + + mob = read_mobile(r_num, REAL); + do_stat_character(ch, mob); + char_to_room(mob, 0); + extract_char(mob); + + +5.3. How do I fix the ``wizlock'' bug that lets lower immortals lock + out higher immortals? + +Simple, insert this code into 'do_wizlock()' in 'act.wizard.c': + + 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; + + +5.4. 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 + + mudlog(MAX(LEVEL_IMMORT, ... + +to + + mudlog(MAX(GET_LEVEL(i), ... + +where ``i'' is either ``ch'' or ``d->character'' depending on the +call. + + +6. CircleMUD 3.0 Questions + +6.1. Are there any bugs in patch level 19? + +There are no bugs. Only features. Seriously though, if perchance you find +a bug, please mail it (along with a possible fix) to the bugs database + 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 +(http://bugs.circlemud.org/). + + +6.2. 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 release 3.10 now, instead of 3.0. In the +mean time, check out the CircleMUD FTP Server: + +ftp://ftp.circlemud.org/pub/CircleMUD/contrib/olc/ + + +6.3. 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 Builder's Manual +(http://www.circlemud.org/~jelson/cdp/building/). + + +6.4. 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 +(ftp://ftp.circlemud.org/pub/CircleMUD/cvs/) until we get an online +anonymous CVS. And don't ask when the next CVS snapshot will be, we'll do +it when we have some changes worth it. + + +6.5. 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 sysdep.h at the comment above the line that says ``#define +POSIX_NONBLOCK_BROKEN" for a possible fix. Once this is done, recompile the +MUD and try again. If you use the POSIX_NONBLOCK_BROKEN constant and it +fixes your problem, please send mail to the bugs database + and let us know exactly what kind of system you are +using and what you had to do to fix it. + + +6.6. Why does CircleMUD use BUF switches all through the code, what's + happening here? + +From Jeremy: + +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 Diku 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). + +First, I should explain what output queueing is and why it is necessary. On +each pass through the 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 game_loop() is to send all the queued output +out over the network. + +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 send_to_char(), 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. + +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 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 ``buf_largecount'' variable records the current pool size. + +If a player has 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. + +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 Diku used a +dynamically allocated buffer scheme to queue output, which unfortunately +meant that for each player, on 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 malloc(), individually written to +the system using individual calls to write(), and then free()'d. My system +saves hundreds or thousands of calls per second to malloc() and free(), and +reduces the number of system calls *drastically* (to at most one per player +per pass through the game loop). + +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. + +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 +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. + +But - there's a problem with this. There are certain cases when many +players have to see a lot of output at the same instant (i.e. on the same +pass through the 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 +game_loop(). + +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.) + +Hopefully this clears up the way buffers work. + + +6.7. 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 class.doc is available on the FTP site: + +ftp://ftp.circlemud.org/pub/CircleMUD/contrib/docs/3.x/class.txt + +The same applies for levels, in the file levels.doc +(ftp://ftp.circlemud.org/pub/CircleMUD/contrib/docs/3.x/levels.txt) +which can be found in the same place. + + +6.8. Is there a complete ``coding.doc''? + +No. Look at the README.NOW in the docs directory. It isn't complete, nor +does anyone have the entire thing. It is being worked upon. + +RTFM diff --git a/README b/README new file mode 100644 index 0000000..3d538b7 --- /dev/null +++ b/README @@ -0,0 +1,209 @@ + + CircleMUD README File + --------------------- + +Welcome to CircleMUD 3.1! I hope you enjoy your stay. + +More information about CircleMUD can be found at the CircleMUD Home Page: +http://www.circlemud.org. That site has the latest source distributions, +code contributions, areas, and documentation (online in HTML form, and +downloadable in ASCII or Postscript). CircleMUD's official FTP site is +ftp://ftp.circlemud.org. + +There is a mailing list for CircleMUD administrators and coders available. +To subscribe, write mail to listserv@post.queensu.ca with a message body +of "subscribe circle". Write to listserv@post.queensu.ca to send mail to +the list. We also now have email addresses for getting help +(help@circlemud.org), and reporting bugs (bugs@circlemud.org). + +Use of this software in any capacity implies that you have read, understood, +and agreed to abide by the terms and conditions set down by the CircleMUD +license contained in the file license.doc. + +Also, out of courtesy if nothing else, please keep the 'credits' file +intact. You can add your own credits on top of the existing file, but I'd +appreciate it if you would not simply remove it and all references to the +word "Circle" everywhere in the MUD. + +Jeremy Elson +jelson@circlemud.org + +---------------------------------------------------------------------------- + +Downloading CircleMUD +--------------------- + +You can find version 3.1 of CircleMUD at the following anonymous FTP sites: + + ftp.circlemud.org:/pub/CircleMUD/3.x + ftp2.circlemud.org:/pub/CircleMUD/3.x + ftp.stormhaven.org:/pub/CircleMUD/3.x + +You can also find information at the WWW site: + + http://www.circlemud.org/ + +The archive is offered in several formats -- for example, one that ends in +.tar.gz, one that ends in .bz2, and one that ends in .zip. All of these +archives have the exact same contents, but have been compressed using +different compression programs. UNIX users usually use the .tar.gz or .bz2 +versions; Windows and OS/2 users typically use the .zip version. + +The archive will be called something like "circleXXXX.tar.gz" (where +"XXXX" is the version number). + +Once you download the archive, you must decompress it. If you have the +.tar.gz version, uncompress it using gzip (GNU unzip) and the tar +archiver. (Both of these utilities can be downloaded from +ftp.gnu.ai.mit.edu:/pub/gnu if you don't have them.) To unpack the +archive on a UNIX system, type: + + gzip -dc circle30xxxx.tar.gz | tar xvf - + +If you have the .zip version, make sure to use an UNZIP program capable +of handling long filenames and which preserves the original directory +structure of the archive (PKUNZIP 2.04 does NOT do either of these things +by default). The best unzip program is the one made by the Info-Zip +team; it is compatible with all UNIX variants, Windows, OS/2, the Amiga, +and every other computer on the planet. For more information, see the +URL http://www.cdrom.com/pub/infozip/UnZip.html. If you have Windows +95, another good choice is WinZip (http://www.winzip.com/). + + +Compiling CircleMUD +------------------- + +CircleMUD compiles under a large number of operating systems; instructions +for compiling on each platform is in a different file. + +From here, read: + +doc/README.UNIX - If you have any type UNIX system, including Linux, + MkLinux, Ultrix, HP/UX, Solaris, SunOS, IRIX, FreeBSD, + OpenBSD, NetBSD, BSDi, Macintosh OS X, etc. + +doc/README.WIN - If you have Windows 95 or NT. + +doc/README.OS2 - If you are using OS/2 Warp Connect v3.0 or OS/2 v2.x. + +doc/README.AMIGA - If you are using an Amiga running AmigaDOS. (If you're + running NetBSD or Linux on an Amiga, use README.UNIX + instead.) + +doc/README.ARC - If you are using an Acorn running RiscOS. + +doc/README.VMS - If you happen to be on OpenVMS. + + +If you are interested in porting CircleMUD to a new platform, see the +file doc/porting.txt for some tips. + +Version 3.1 source currently does NOT compile under DOS, Windows 3.x, or +Windows for Workgroups. Also, we currently do not distribute binaries, +although the FTP site does have a very old Amiga binary of CircleMUD 2.20. + +For a small, private MUD, or a MUD used only for testing and development, +about 10 megs of disk space and 16 megs of memory should be sufficient. +For large, public MUDs with a large player base, 30 megs to 50 megs of +disk space and at least 32 megs of memory are recommended. Free memory +is much more important than CPU speed; CircleMUD uses virtually no CPU +time. + + +Other Documentation +------------------- + +If this information isn't enough to get you running, there's a lot more +information available. All documentation (other than this file) is in +the "doc" directory and available on-line at http://www.circlemud.org/. + +The README file in the doc directory describes each documentation file +in detail, but there are several main files which should be of interest: + +"The CircleMUD Administrator's Guide" (admin.pdf) + A good place to start after reading this README file, admin.txt gives +an overall description of how Circle works, how to get it to compile and +run for the first time, information about customizing and configuration +options and command-line arguments, and tips on maintenance and day-to-day +MUD administration. + +"The CircleMUD Builder's Manual" (building.pdf) + For the builders in your group, this documents the world-file format +and describes how to create new rooms, objects, and monsters. Also, it +describes how to add new areas to the MUD and gives some tips about game +balance and world-file debugging. + +"The CircleMUD Coder's Manual" (coding.pdf) + For the coders in your group, a technical reference describing some of +the more basic coding tasks such as how to add new commands, spells, +skills, socials, and classes. Note that it assumes the reader already has +an excellent knowledge of C; the manual is not a C tutorial. + +"The CircleMUD SYSERR List" (syserr.txt, syserr.ps) + A comprehensive list of all the possible SYSERR messages CircleMUD +can generate, and a description of what can cause each problem and how to +solve it. An excellent guide for troubleshooting and area debugging. +[NOTE: This document is not complete at this time] + + +Getting Help +------------ + +If you have strange problems -- and you can't figure out the answer by +reading the documentation -- fear not, there are many other resources +available. The best is probably our email alias specifically for newbie +questions: help@circlemud.org. Write to that address for basic questions +about getting Circle up and running. + +For more advanced discussion, you can use the CircleMUD Mailing List. +You can subscribe by writing mail to "listserv@post.queensu.ca" with a +message body of "subscribe circle". If you want to write mail to the +list, address it to "circle@post.queensu.ca". Over 400 CircleMUD imps +read that list regularly. + +If that doesn't work, you can always contact me directly by writing to +jelson@circlemud.org. Or, take a look at the CircleMUD Home Page which is +at http://www.circlemud.org which has extensive, up-to-date documentation +and patches on-line. + +Finally, if you have USENET access and are very brave, you can try posting +to the newsgroups rec.games.mud.diku or rec.games.mud.admin. + +No matter how you choose to get help, make sure to always include the +following information in your mail: + + -- The exact version of CircleMUD you're using (e.g., "CircleMUD 2.20", + "CircleMUD 3.0 beta patchlevel 12", etc.). + -- The EXACT text of any error messages, compiler errors, link errors, + or any other errors you're getting. + -- The exact type of hardware, operating system name and version, and + compiler you're using. + -- A description of ANY changes you've made, no matter how small, that + might have contributed to the error. + -- If you are having trouble getting Circle running for the very first + time, also be sure to include the output of 'configure' and the file + 'config.log'. + +Remember, I get dozens of pieces of email every day. If you don't bother to +give me an excellent description of your problem, I will be somewhat annoyed +and will not be able to help you. For example, this email that I received: + + hi I need some help with CircleMUD....i tried compiling it on my system + but I got all sorts of errors, and when i type bin/circle like it says + in the manual it doesn't work. Can you help???? you can log into my + system if you want, the password is mud5. + +Letters like that are always ignored. I get a lot of them. + + +Good luck, and have fun! + +Jeremy Elson +aka Ras/Rasmussen +jelson@circlemud.org + + +USE OF THIS SOFTWARE IN ANY CAPACITY IMPLIES THAT YOU HAVE READ, UNDERSTOOD, +AND AGREED TO ABIDE BY THE TERMS AND CONDITIONS SET DOWN BY THE CIRCLEMUD +LICENSE. + diff --git a/automaint b/automaint new file mode 100755 index 0000000..b70cd26 --- /dev/null +++ b/automaint @@ -0,0 +1,37 @@ +#!/bin/sh + +cat << EOF +This script will purge your playerfile, and then delete the object files +of all players not in the playerfile. A log of all deleted players, and +the reason for their deletion, will be kept in lib/etc/DELETED. If you +would like to adjust the allowable idle times before players are deleted, +edit src/util/purgeplay.c and recompile it. + +*************************************************************************** +Note, you should NEVER run this script while the MUD is running. Also, you +may wish to make a backup of your playerfile and/or object files before +purging them. +*************************************************************************** + +Press return to continue with the purge, Ctrl-C to quit... +EOF +read dummy +echo "Last chance to bail out. Press return now to purge old players." +read dummy + +echo "Purging playerfile, please wait..." +cd lib/etc +echo `date` >> DELETED +../../bin/purgeplay players >> DELETED + +if [ ! -z players.new ]; then + mv players players.old + mv players.new players +fi + +echo "Done." + +cd ../plrobjs +purgeobjs +cd ../.. +exit diff --git a/autorun b/autorun new file mode 100755 index 0000000..70ee8bf --- /dev/null +++ b/autorun @@ -0,0 +1,166 @@ +#!/bin/sh +# +# CircleMUD autorun script +# Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson +# New log rotating code contributed by Peter Ajamian +# Copyright (c) 1996 The Trustees of The Johns Hopkins University +# All Rights Reserved +# See license.doc for more information +# +############################################################################# +# +# This script can be used to run CircleMUD over and over again (i.e., have it +# automatically reboot if it crashes). It will run the game, and copy some +# of the more useful information from the system logs to the 'log' directory +# for safe keeping. +# +# You can control the operation of this script by creating and deleting files +# in Circle's root directory, either manually or by using the 'shutdown' +# command from within the MUD. +# +# Creating a file called .fastboot makes the script wait only 5 seconds +# between reboot attempts instead of the usual 60. If you want a quick +# reboot, use the "shutdown reboot" command from within the MUD. +# +# Creating a file called .killscript makes the script terminate (i.e., stop +# rebooting the MUD). If you want to shut down the MUD and make it stay +# shut down, use the "shutdown die" command from within the MUD. +# +# Finally, if a file called pause exists, the script will not reboot the MUD +# again until pause is removed. This is useful if you want to turn the MUD +# off for a couple of minutes and then bring it back up without killing the +# script. Type "shutdown pause" from within the MUD to activate this feature. +# + +# The port on which to run the MUD +PORT=4000 + +# Default flags to pass to the MUD server (see admin.txt for a description +# of all flags). +FLAGS='-q' + +# Number of syslog.# files to keep in the log directory. +BACKLOGS=6 + +# Each record in the following variable contains information for one log file. +# The fields are filename:maxlines:pattern where filename is the name of the +# log file, maxlines is the maximum number of lines in the file (0 for +# unlimited) and pattern is a pattern which must be matched for a line to get +# copied from syslog to this log file. +LOGFILES=' +delete:0:self-delete +dts:0:death trap +rip:0:killed +restarts:0:Running +levels:0:advanced +rentgone:0:equipment lost +usage:0:usage +newplayers:0:new player +errors:0:SYSERR +godcmds:0:(GC) +badpws:0:Bad PW +' + +# The following is the number of lines in syslog.CRASH. Set to 0 to disable +# crashlogs. +LEN_CRASHLOG=30 + +############################################################################# + +############# +# Functions # +############# + +# The proc_syslog function will grep the logs for the various different info +# and rotate the logs in the log directory. +proc_syslog () { + # Return if there's no syslog + if ! [ -s syslog ]; then return; fi + + # Create the crashlog + if [ -n "$LEN_CRASHLOG" -a "$LEN_CRASHLOG" -gt 0 ]; then + tail -n $LEN_CRASHLOG syslog > syslog.CRASH + fi + + # Append to the specialty logfiles and truncate to maximum length if + # applicable + OLD_IFS=$IFS + IFS=' +' + for rec in $LOGFILES; do + name=log/`echo $rec|cut -f 1 -d:` + len=`echo $rec|cut -f 2 -d:` + pattern=`echo $rec|cut -f 3- -d:` + + fgrep $pattern syslog >> $name + if [ $len -gt 0 ]; then + temp=`mktemp $name.XXXXXX` + tail -n $len $name > $temp + mv -f $temp $name + fi + done + IFS=$OLD_IFS + + # Find the # to set the new log file to. + if [ -s log/syslog.$BACKLOGS ]; then + declare -i newlog=$BACKLOGS+1 + else + declare -i newlog=1 + while [ -s log/syslog.$newlog ]; do newlog=$newlog+1; done + fi + + # Rotate the logs. + declare -i y=2 + while [ $y -lt $newlog ]; do + declare -i x=$y-1 + mv -f log/syslog.$y log/syslog.$x + y=$y+1 + done + mv -f syslog log/syslog.$newlog +} + + +######## +# Main # +######## + +# Check to see if there is a syslog which would indicate that autorun +# was improperly killed (ie maybe the system was rebooted or ?). +if [ -s syslog ]; then + echo Improper shutdown of autorun detected, rotating syslogs before startup. >> syslog + proc_syslog +fi + +# The main loop +while ( : ) do + + DATE=`date` + echo "autorun starting game $DATE" > syslog + echo "running bin/circle $FLAGS $PORT" >> syslog + + # On Cygwin, you may need to precede this next line with './' for + # './bin/circle' as the command. + bin/circle $FLAGS $PORT >> syslog 2>&1 + + if [ -r .killscript ]; then + DATE=`date`; + echo "autoscript killed $DATE" >> syslog + rm .killscript + proc_syslog + exit + fi + + if [ ! -r .fastboot ]; then + sleep 60 + else + rm .fastboot + fi + + while [ -r pause ]; do + sleep 60 + done + + proc_syslog + sleep 5 + +done diff --git a/autorun.README b/autorun.README new file mode 100644 index 0000000..857cb02 --- /dev/null +++ b/autorun.README @@ -0,0 +1,29 @@ +From: Peter Ajamian + +This is something I did a few weeks ago but didn't get around to +submitting it until now. Basically There have always been a few things +about the autorun script which have always irked me, this "improved" +version is my attempt to correct those deficiencies as well as to add a +little bit of extra functionality to the script. The script addresses +the following deficiencies: +- syslog rotation: When a new MUD is started an error is produced + during the syslog rotation after the first 6 times the MUD is run. This + is because there is no check for the existance of the files being + rotated. +- autorun crashes append to log instead of rotating: If autorun crashes, + or is manually killed, or a server reboot is done without first shutting + down the MUD then the new syslog will continue to append to the old one + instead of rotating the syslogs and starting a fresh one. This is + because the syslogs are currently rotated only _after_ the mud is + properly shut down. To correct for this I have allowed for syslog + rotation before the MUD boots as well. Also this script will detect + improper shutdown of autorun and make a note in the syslog before + rotating them. +- Better customization of grep-generated logs: Various options have been + added to the autorun script to allow for easy customization of + grep-generated logs. See the comments in the script for details. + +You may want to do some compatibility testing on varying platforms +because this uses various commands that were are not present in the +current autorun (cut, mktemp, and maybe others I can't think of now). +This script also uses functions. diff --git a/autorun.amiga b/autorun.amiga new file mode 100755 index 0000000..96c468e --- /dev/null +++ b/autorun.amiga @@ -0,0 +1,33 @@ +LAB runloop + + if exists .killscript then + delete .killscript quiet + SKIP the_end + endif + + if exists .fastboot then + wait 3 + delete .fastboot quiet + else + wait 5 + endif + + bin/Circle + + search nonum log/syslog "self-delete" >> log/delete + search nonum log/syslog "death trap" >> log/dts + search nonum log/syslog "killed" >> log/rip + search nonum log/syslog "Running" >> log/restarts + search nonum log/syslog "advanced" >> log/levels + search nonum log/syslog "equipment lost" >> log/rentgone + search nonum log/syslog "usage" >> log/usage + search nonum log/syslog "new player" >> log/newplayers + search nonum log/syslog "SYSERR" >> log/errors + search nonum log/syslog "(GC)" >> log/godcmds + search nonum log/syslog "Bad PW" >> log/badpws + + delete log/syslog quiet + + SKIP runloop BACK + +LAB the_end \ No newline at end of file diff --git a/autorun.cmd b/autorun.cmd new file mode 100644 index 0000000..29199e5 --- /dev/null +++ b/autorun.cmd @@ -0,0 +1,75 @@ +/* REXX */ +/* Note: This is an example Autorun REXX Script for use with OS/2 and + CircleMUD. You may use it as is, or as the basis for your own + script. + April 18, 1996 - David A. Carver */ + +/* CircleMUD autorun script + * Originally by Fred C. Merkel + * Copyright (c) 1993 The Trustees of The Johns Hopkins University + * All Rights Reserved + * See license.doc for more information + * + * If .fastboot exists, the script will sleep for only 5 seconds between + * reboot attempts. If .killscript exists, the script commit suicide (and + * remove .killscript). If pause exists, the script will repeatedly sleep for + * 60 seconds and will not restart the mud until pause is removed. + */ + +'echo off' + +PORT=4000 +FLAGS='' + +call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" +call SysLoadFuncs + +Do forever + call SysCls + say center('CrapWeasel MUD',79) + say center('AutoRun Procedure',79) + 'del syslog' + Say "AutoRun starting game " || DATE() + "set EMXOPT=-h150" + + "bin\circle " FLAGS PORT || " >> syslog" + + + say 'Extracting little log information' + 'del log\*.* /n' + 'fgrep -w "self-delete" syslog >> log/delete' + 'fgrep -w "death trap" syslog >> log/dts' + 'fgrep -w "killed" syslog >> log/rip' + 'fgrep -w "Running" syslog >> log/restarts' + 'fgrep -w "advanced" syslog >> log/levels' + 'fgrep -w "equipment lost" syslog >> log/rentgone' + 'fgrep -w "usage" syslog >> log/usage' + 'fgrep -w "olc" syslog >> log/olc' + 'fgrep -w "new player" syslog >> log/newplayers' + 'fgrep -w "SYSERR" syslog >> log/errors' + 'fgrep -w "(GC)" syslog >> log/godcmds' + 'fgrep -w "Bad PW" syslog >> log/badpws' + 'fgrep -w "has connected" syslog >> log/whocon' + + Do while stream("pause","c","query exists")<>"" + Say "Pausing..." + Call SysSleep(10) + end + + if (stream("fastboot","c","query exists")="") then do + Say "Waiting 40 seconds to reboot" + Call SysSleep(40) + end + else do + "del fastboot" + Say "Waiting 5 seconds to reboot" + Call SysSleep(5) + end + + if (stream("killscr","c","query exists")<>"") then do + Say "Exiting autorun" + "echo autoscript killed "DATE() ">> syslog" + "del killscr" + exit + end +end diff --git a/autorun.pl b/autorun.pl new file mode 100755 index 0000000..5895af8 --- /dev/null +++ b/autorun.pl @@ -0,0 +1,107 @@ +#!/usr/bin/perl +# autorun -- maintain a Circle mud server +# Copyright (c)1995 Vi'Rage Studios + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# csh original by Fred C. Merkel, PERL conversion by D. Hall + +# .fastboot sleep for only 5 seconds, instead of the default 20 +# .killscript script will exit, and mud will not reboot +# .pause pause (sleep 1 minute intervals) until .pause it removed + +$port = 4000; +$flags = "-q"; + +$home = "."; +$bin = "$home/bin"; +$lib = "$home/lib"; +$log = "$home/log"; + +chdir $home; + +while (1) { + + # Open SYSLOG and dup STDERR into SYSLOG + open (SYSLOG, ">> syslog"); + open (STDERR, ">& SYSLOG"); + + print SYSLOG "autoscript starting game ", `date`; + open (SERVER, "bin/circle $flags $port |"); + + while () { + print SYSLOG; + } + + # First we open everything + open (SYSLOG, ">log/delete"); + open (DTRAPS, ">>log/dtraps"); + open (DEATHS, ">>log/deaths"); + open (REBOOT, ">>log/reboots"); + open (LEVELS, ">>log/levels"); + open (NORENT, ">>log/norent"); + open (USAGE, ">>log/usage"); + open (NEWPLR, ">>log/newplrs"); + open (SYSERR, ">>log/errors"); + open (GODCMD, ">>log/godcmds"); + open (BADPWS, ">>log/badpws"); + + # Then we stash everything + while () { + print DELETE if /self-delete/; + print DTRAPS if /death trap/; + print DEATHS if /killed/; + print REBOOT if /Running/; + print LEVELS if /advanced/; + print NORENT if /equipment lost/; + print USAGE if /usage/; + print NEWPLR if /new player/; + print SYSERR if /SYSERR/; + print GODCMD if /\(GC\)/; + print BADPWs if /Bad PW/; + } + close (SYSLOG); + + # Rotate SYSLOG files + unlink ('log/syslog.6'); + rename ('log/syslog.5', 'log/syslog.6'); + rename ('log/syslog.4', 'log/syslog.5'); + rename ('log/syslog.3', 'log/syslog.4'); + rename ('log/syslog.2', 'log/syslog.3'); + rename ('log/syslog.1', 'log/syslog.2'); + rename ('syslog' , 'log/syslog.1'); + + # should we stay dead? + if (-r '.killscript') { + unlink '.killscript'; + open (SYSLOG, '>> log/syslog.1'); + print SYSLOG "autoscript killed ", `date`; + exit; + } + + # or just play dead? + while (-r '.pause') { + sleep 60; + } + + # or reboot as soon as possible? + if (-r '.fastboot') { + unlink '.fastboot'; + sleep 5; + } else { + sleep 20 + } +} diff --git a/autorun.sh b/autorun.sh new file mode 100755 index 0000000..74980ec --- /dev/null +++ b/autorun.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# +# CircleMUD autorun script +# Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson +# Copyright (c) 1996 The Trustees of The Johns Hopkins University +# All Rights Reserved +# See license.doc for more information +# +############################################################################# +# +# This script can be used to run CircleMUD over and over again (i.e., have it +# automatically reboot if it crashes). It will run the game, and copy some +# of the more useful information from the system logs to the 'log' directory +# for safe keeping. +# +# You can control the operation of this script by creating and deleting files +# in Circle's root directory, either manually or by using the 'shutdown' +# command from within the MUD. +# +# Creating a file called .fastboot makes the script wait only 5 seconds +# between reboot attempts instead of the usual 60. If you want a quick +# reboot, use the "shutdown reboot" command from within the MUD. +# +# Creating a file called .killscript makes the script terminate (i.e., stop +# rebooting the MUD). If you want to shut down the MUD and make it stay +# shut down, use the "shutdown die" command from within the MUD. +# +# Finally, if a file called pause exists, the script will not reboot the MUD +# again until pause is removed. This is useful if you want to turn the MUD +# off for a couple of minutes and then bring it back up without killing the +# script. Type "shutdown pause" from within the MUD to activate this feature. +# + +# The port on which to run the MUD +PORT=4000 + +# Default flags to pass to the MUD server (see admin.txt for a description +# of all flags). +FLAGS='-q' + +############################################################################# + +while ( : ) do + + DATE=`date` + echo "autorun starting game $DATE" >> syslog + echo "running bin/circle $FLAGS $PORT" >> syslog + + bin/circle $FLAGS $PORT >> syslog 2>&1 + + tail -30 syslog > syslog.CRASH + + fgrep "self-delete" syslog >> log/delete + fgrep "death trap" syslog >> log/dts + fgrep "killed" syslog >> log/rip + fgrep "Running" syslog >> log/restarts + fgrep "advanced" syslog >> log/levels + fgrep "equipment lost" syslog >> log/rentgone + fgrep "usage" syslog >> log/usage + fgrep "new player" syslog >> log/newplayers + fgrep "SYSERR" syslog >> log/errors + fgrep "(GC)" syslog >> log/godcmds + fgrep "Bad PW" syslog >> log/badpws + + rm log/syslog.1 + mv log/syslog.2 log/syslog.1 + mv log/syslog.3 log/syslog.2 + mv log/syslog.4 log/syslog.3 + mv log/syslog.5 log/syslog.4 + mv log/syslog.6 log/syslog.5 + mv syslog log/syslog.6 + touch syslog + + if [ -r .killscript ]; then + DATE=`date`; + echo "autoscript killed $DATE" >> syslog + rm .killscript + exit + fi + + if [ ! -r .fastboot ]; then + sleep 60 + else + rm .fastboot + sleep 5 + fi + + while [ -r pause ]; do + sleep 60 + done + +done diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..ee26c68 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,12 @@ +autowiz +delobjs +listrent +mudpasswd +play2to3 +purgeplay +shopconv +showplay +sign +split +wld2html +circle diff --git a/bin/README b/bin/README new file mode 100644 index 0000000..5da5ca5 --- /dev/null +++ b/bin/README @@ -0,0 +1 @@ +This is the directory for compiled binaries. diff --git a/cnf/README b/cnf/README new file mode 100644 index 0000000..a2af237 --- /dev/null +++ b/cnf/README @@ -0,0 +1,2 @@ +These files are for generating the 'configure' script. They are useless +to everyone except for hackers who know how to use GNU autoconf. JE 28 Oct 97 diff --git a/cnf/acconfig.h b/cnf/acconfig.h new file mode 100644 index 0000000..e07f499 --- /dev/null +++ b/cnf/acconfig.h @@ -0,0 +1,17 @@ +/* Define if we're compiling CircleMUD under any type of UNIX system. */ +#undef CIRCLE_UNIX + +/* Define if the system is capable of using crypt() to encrypt. */ +#undef CIRCLE_CRYPT + +/* Define if we don't have proper support for the system's crypt(). */ +#undef HAVE_UNSAFE_CRYPT + +/* Define is the system has struct in_addr. */ +#undef HAVE_STRUCT_IN_ADDR + +/* Define to `int' if doesn't define. */ +#undef socklen_t + +/* Define to `int' if doesn't define. */ +#undef ssize_t diff --git a/cnf/aclocal.m4 b/cnf/aclocal.m4 new file mode 100644 index 0000000..e43caef --- /dev/null +++ b/cnf/aclocal.m4 @@ -0,0 +1,77 @@ +AC_DEFUN(AC_CHECK_PROTO, +[ +ac_safe=translit($1, './+-', '__p_'); + +AC_MSG_CHECKING([if $1 is prototyped]) +AC_CACHE_VAL(ac_cv_prototype_$ac_safe, [# + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +AC_TRY_COMPILE([ +#define NO_LIBRARY_PROTOTYPES +#define __COMM_C__ +#define __ACT_OTHER_C__ +#include "src/sysdep.h" +#ifdef $1 + error - already defined! +#endif +void $1(int a, char b, int c, char d, int e, char f, int g, char h); +],dnl +, +eval "ac_cv_prototype_$ac_safe=no",eval "ac_cv_prototype_$ac_safe=yes") + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi +]) + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) +else + AC_DEFINE(builtin(format, NEED_%s_PROTO, translit($1, 'a-z', 'A-Z')), , Check for a prototype to $1.) + AC_MSG_RESULT(no) +fi +]) + +dnl @@@t1="MAKE_PROTO_SAFE($1)"; t2="MAKE_PROTO_NAME($t1)"; literals="$literals $t2"@@@]) + + +AC_DEFUN(AC_UNSAFE_CRYPT, [ + AC_CACHE_CHECK([whether crypt needs over 10 characters], ac_cv_unsafe_crypt, [ + if test ${ac_cv_header_crypt_h-no} = yes; then + use_crypt_header="#include " + fi + if test ${ac_cv_lib_crypt_crypt-no} = yes; then + ORIGLIBS=$LIBS + LIBS="-lcrypt $LIBS" + fi + AC_TRY_RUN( +changequote(<<, >>)dnl +<< +#define _XOPEN_SOURCE +#include +#include +$use_crypt_header + +int main(void) +{ + char pwd[11], pwd2[11]; + + strncpy(pwd, (char *)crypt("FooBar", "BazQux"), 10); + pwd[10] = '\0'; + strncpy(pwd2, (char *)crypt("xyzzy", "BazQux"), 10); + pwd2[10] = '\0'; + if (strcmp(pwd, pwd2) == 0) + exit(0); + exit(1); +} +>> +changequote([, ])dnl +, ac_cv_unsafe_crypt=yes, ac_cv_unsafe_crypt=no, ac_cv_unsafe_crypt=no)]) +if test $ac_cv_unsafe_crypt = yes; then + AC_DEFINE(HAVE_UNSAFE_CRYPT) +fi +if test ${ac_cv_lib_crypt_crypt-no} = yes; then + LIBS=$ORIGLIBS +fi +]) diff --git a/cnf/configure.in b/cnf/configure.in new file mode 100644 index 0000000..1b4bc41 --- /dev/null +++ b/cnf/configure.in @@ -0,0 +1,215 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(src/act.comm.c) +AC_SUBST(MYFLAGS) +AC_SUBST(NETLIB) +AC_SUBST(CRYPTLIB) + +AC_CONFIG_HEADER(src/conf.h) +AC_DEFINE(CIRCLE_UNIX) + +dnl Find the 'more' program +AC_CHECK_PROGS(MORE, less most more cat) + +dnl Checks for programs. +AC_PROG_CC + +dnl If we're using gcc, use gcc options. +dnl If not, test for various common switches to make a 'cc' compiler +dnl compile ANSI C code. +if test $ac_cv_prog_gcc = yes; then + + dnl Determine if gcc -Wall causes warnings on isascii(), etc. + AC_CACHE_CHECK(whether ${CC-cc} -Wall also needs -Wno-char-subscripts, + ac_cv_char_warn, + [ + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wall -Werror" + AC_TRY_COMPILE([#include ], + [ int i; char c = '0'; + i = isascii(c); + i = isdigit(c); + i = isprint(c); + ], ac_cv_char_warn=no, ac_cv_char_warn=yes) + CFLAGS=$OLDCFLAGS + ]) + + dnl If Determine if gcc can accept -Wno-char-subscripts + AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-char-subscripts, ac_cv_gcc_ncs, + [ + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wno-char-subscripts" + AC_TRY_COMPILE(, , ac_cv_gcc_ncs=yes, ac_cv_gcc_ncs=no) + CFLAGS=$OLDCFLAGS + ]) + + dnl If Determine if gcc can accept -fno-builtin + AC_CACHE_CHECK(whether ${CC-cc} accepts -fno-builtin, ac_cv_gcc_fnb, + [ + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + AC_TRY_COMPILE(, , ac_cv_gcc_fnb=yes, ac_cv_gcc_fnb=no) + CFLAGS=$OLDCFLAGS + ]) + + dnl If gcc -Wall gives no warnings with isascii(), use "-Wall"; + dnl Otherwise, if gcc -Wall gives isascii warnings: + dnl If we can use -Wno-char-subscripts, use "-Wall -Wno-char-subscripts" + dnl If can't use -Wno-char-subscripts, use no flags at all. + + if test ${ac_cv_char_warn:-ERROR} = no; then + MYFLAGS="-Wall" + else + if test ${ac_cv_gcc_ncs:-ERROR} = yes; then + MYFLAGS="-Wall -Wno-char-subscripts" + else + MYFLAGS="" + fi + fi + +else + dnl We aren't using gcc so we can't assume any special flags. + MYFLAGS="" + +fi + +dnl Checks for libraries. We check for the library only if the function is +dnl not available without the library. +AC_CHECK_FUNC(gethostbyaddr, , + [AC_CHECK_LIB(nsl, gethostbyaddr, NETLIB="-lnsl $NETLIB")]) + +AC_CHECK_FUNC(socket, , + [AC_CHECK_LIB(socket, socket, NETLIB="-lsocket $NETLIB")]) + +AC_CHECK_FUNC(malloc, , + [AC_CHECK_LIB(malloc, malloc)]) + +AC_CHECK_FUNC(crypt, AC_DEFINE(CIRCLE_CRYPT), + [AC_CHECK_LIB(crypt, crypt, AC_DEFINE(CIRCLE_CRYPT) CRYPTLIB="-lcrypt")] + ) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h sys/fcntl.h errno.h net/errno.h string.h strings.h) +AC_CHECK_HEADERS(limits.h sys/time.h sys/select.h sys/types.h unistd.h) +AC_CHECK_HEADERS(memory.h crypt.h assert.h arpa/telnet.h arpa/inet.h) +AC_CHECK_HEADERS(sys/stat.h sys/socket.h sys/resource.h netinet/in.h netdb.h) +AC_CHECK_HEADERS(signal.h sys/uio.h mcheck.h) + +AC_UNSAFE_CRYPT + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_CHECK_TYPE(ssize_t, int) +AC_HEADER_TIME + +dnl Check for the 'struct in_addr' definition. Ugly, yes. +if test $ac_cv_header_netinet_in_h = no; then + ac_cv_struct_in_addr = no +else + if test $ac_cv_header_sys_types_h = yes; then + headers=`cat << EOF +#include +#include +EOF +` + else + headers="#include " + fi + + AC_CACHE_CHECK([for struct in_addr], ac_cv_struct_in_addr, + [ AC_TRY_COMPILE([$headers],[struct in_addr tp; tp.s_addr;], ac_cv_struct_in_addr=yes, ac_cv_struct_in_addr=no)]) + + if test $ac_cv_struct_in_addr = yes; then + AC_DEFINE(HAVE_STRUCT_IN_ADDR) + fi +fi + + +dnl Check for the 'typedef socklen_t' definition. Even uglier, yes. +if test $ac_cv_header_sys_socket_h = no; then + ac_cv_socklen_t = no; +else + AC_CACHE_CHECK([for typedef socklen_t], ac_cv_socklen_t, + [ AC_TRY_COMPILE([#include ],[socklen_t sl; sl=0;], ac_cv_socklen_t=yes, ac_cv_socklen_t=no)]) +fi + +if test $ac_cv_socklen_t = no; then + AC_DEFINE(socklen_t, int) +fi + + +dnl Checks for library functions. +AC_TYPE_SIGNAL +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(gettimeofday select snprintf strcasecmp strdup strerror stricmp strlcpy strncasecmp strnicmp strstr vsnprintf) + +dnl Check for functions that parse IP addresses +ORIGLIBS=$LIBS +LIBS="$LIBS $NETLIB" +AC_CHECK_FUNCS(inet_addr inet_aton) +LIBS=$ORIGLIBS + +dnl Check for prototypes +AC_CHECK_PROTO(accept) +AC_CHECK_PROTO(atoi) +AC_CHECK_PROTO(atol) +AC_CHECK_PROTO(bind) +AC_CHECK_PROTO(bzero) +AC_CHECK_PROTO(chdir) +AC_CHECK_PROTO(close) +AC_CHECK_PROTO(crypt) +AC_CHECK_PROTO(fclose) +AC_CHECK_PROTO(fcntl) +AC_CHECK_PROTO(fflush) +AC_CHECK_PROTO(fprintf) +AC_CHECK_PROTO(fputc) +AC_CHECK_PROTO(fputs) +AC_CHECK_PROTO(fread) +AC_CHECK_PROTO(fscanf) +AC_CHECK_PROTO(fseek) +AC_CHECK_PROTO(fwrite) +AC_CHECK_PROTO(getpeername) +AC_CHECK_PROTO(getpid) +AC_CHECK_PROTO(getrlimit) +AC_CHECK_PROTO(getsockname) +AC_CHECK_PROTO(gettimeofday) +AC_CHECK_PROTO(htonl) +AC_CHECK_PROTO(htons) +AC_CHECK_PROTO(inet_addr) +AC_CHECK_PROTO(inet_aton) +AC_CHECK_PROTO(inet_ntoa) +AC_CHECK_PROTO(listen) +AC_CHECK_PROTO(ntohl) +AC_CHECK_PROTO(perror) +AC_CHECK_PROTO(printf) +AC_CHECK_PROTO(qsort) +AC_CHECK_PROTO(read) +AC_CHECK_PROTO(remove) +AC_CHECK_PROTO(rewind) +AC_CHECK_PROTO(select) +AC_CHECK_PROTO(setitimer) +AC_CHECK_PROTO(setrlimit) +AC_CHECK_PROTO(setsockopt) +AC_CHECK_PROTO(snprintf) +AC_CHECK_PROTO(socket) +AC_CHECK_PROTO(sprintf) +AC_CHECK_PROTO(sscanf) +AC_CHECK_PROTO(strcasecmp) +AC_CHECK_PROTO(strdup) +AC_CHECK_PROTO(strerror) +AC_CHECK_PROTO(stricmp) +AC_CHECK_PROTO(strlcpy) +AC_CHECK_PROTO(strncasecmp) +AC_CHECK_PROTO(strnicmp) +AC_CHECK_PROTO(system) +AC_CHECK_PROTO(time) +AC_CHECK_PROTO(unlink) +AC_CHECK_PROTO(vsnprintf) +AC_CHECK_PROTO(write) + +AC_OUTPUT(src/Makefile src/util/Makefile) +# +echo "Configuration completed. To compile, type: cd src; make" diff --git a/configure b/configure new file mode 100755 index 0000000..5bd8ad1 --- /dev/null +++ b/configure @@ -0,0 +1,5879 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/act.comm.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + + + + +cat >> confdefs.h <<\EOF +#define CIRCLE_UNIX 1 +EOF + + +for ac_prog in less most more cat +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MORE"; then + ac_cv_prog_MORE="$MORE" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MORE="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MORE="$ac_cv_prog_MORE" +if test -n "$MORE"; then + echo "$ac_t""$MORE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MORE" && break +done + + +# Extract the first word of "gcc", so it can be a program name with args. +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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + 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 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 697 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +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_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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:761: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + +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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wall -Werror" + cat > conftest.$ac_ext < +int main() { + int i; char c = '0'; + i = isascii(c); + i = isdigit(c); + i = isprint(c); + +; return 0; } +EOF +if { (eval echo configure:815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_char_warn=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_char_warn=yes +fi +rm -f conftest* + CFLAGS=$OLDCFLAGS + +fi + +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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wno-char-subscripts" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_gcc_ncs=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_gcc_ncs=no +fi +rm -f conftest* + CFLAGS=$OLDCFLAGS + +fi + +echo "$ac_t""$ac_cv_gcc_ncs" 1>&6 + + echo $ac_n "checking whether ${CC-cc} accepts -fno-builtin""... $ac_c" 1>&6 +echo "configure:864: checking whether ${CC-cc} accepts -fno-builtin" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_fnb'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_gcc_fnb=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_gcc_fnb=no +fi +rm -f conftest* + CFLAGS=$OLDCFLAGS + +fi + +echo "$ac_t""$ac_cv_gcc_fnb" 1>&6 + + + if test ${ac_cv_char_warn:-ERROR} = no; then + MYFLAGS="-Wall" + else + if test ${ac_cv_gcc_ncs:-ERROR} = yes; then + MYFLAGS="-Wall -Wno-char-subscripts" + else + MYFLAGS="" + fi + fi + +else + MYFLAGS="" + +fi + +echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 +echo "configure:912: checking for gethostbyaddr" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+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 gethostbyaddr(); + +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_gethostbyaddr) || defined (__stub___gethostbyaddr) +choke me +#else +gethostbyaddr(); +#endif + +; return 0; } +EOF +if { (eval echo configure:940: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyaddr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyaddr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 +echo "configure:958: 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 + 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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + NETLIB="-lnsl $NETLIB" +else + echo "$ac_t""no" 1>&6 +fi + +fi + + +echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:1001: checking for socket" >&5 +if eval "test \"`echo '$''{'ac_cv_func_socket'+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 socket(); + +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_socket) || defined (__stub___socket) +choke me +#else +socket(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1029: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socket=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:1047: 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 + 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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + NETLIB="-lsocket $NETLIB" +else + echo "$ac_t""no" 1>&6 +fi + +fi + + +echo $ac_n "checking for malloc""... $ac_c" 1>&6 +echo "configure:1090: checking for malloc" >&5 +if eval "test \"`echo '$''{'ac_cv_func_malloc'+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 malloc(); + +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_malloc) || defined (__stub___malloc) +choke me +#else +malloc(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1118: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_malloc=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'malloc`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for malloc in -lmalloc""... $ac_c" 1>&6 +echo "configure:1136: 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 + 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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo malloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + + +echo $ac_n "checking for crypt""... $ac_c" 1>&6 +echo "configure:1186: checking for crypt" >&5 +if eval "test \"`echo '$''{'ac_cv_func_crypt'+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 crypt(); + +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_crypt) || defined (__stub___crypt) +choke me +#else +crypt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1214: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_crypt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define CIRCLE_CRYPT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:1235: 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 + 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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define CIRCLE_CRYPT 1 +EOF + CRYPTLIB="-lcrypt" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1282: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # 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:1303: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:1320: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:1337: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1362: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1375: \"$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* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:1466: 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 $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +for ac_hdr in fcntl.h sys/fcntl.h errno.h net/errno.h string.h strings.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1511: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1521: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in limits.h sys/time.h sys/select.h sys/types.h unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1551: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1561: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in memory.h crypt.h assert.h arpa/telnet.h arpa/inet.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1591: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1601: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/stat.h sys/socket.h sys/resource.h netinet/in.h netdb.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1631: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1641: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +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:1671: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1681: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + + echo $ac_n "checking whether crypt needs over 10 characters""... $ac_c" 1>&6 +echo "configure:1710: checking whether crypt needs over 10 characters" >&5 +if eval "test \"`echo '$''{'ac_cv_unsafe_crypt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test ${ac_cv_header_crypt_h-no} = yes; then + use_crypt_header="#include " + fi + if test ${ac_cv_lib_crypt_crypt-no} = yes; then + ORIGLIBS=$LIBS + LIBS="-lcrypt $LIBS" + fi + if test "$cross_compiling" = yes; then + ac_cv_unsafe_crypt=no +else + cat > conftest.$ac_ext < +#include +$use_crypt_header + +int main(void) +{ + char pwd[11], pwd2[11]; + + strncpy(pwd, (char *)crypt("FooBar", "BazQux"), 10); + pwd[10] = '\0'; + strncpy(pwd2, (char *)crypt("xyzzy", "BazQux"), 10); + pwd2[10] = '\0'; + if (strcmp(pwd, pwd2) == 0) + exit(0); + exit(1); +} + + +EOF +if { (eval echo configure:1749: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_unsafe_crypt=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_unsafe_crypt" 1>&6 +if test $ac_cv_unsafe_crypt = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UNSAFE_CRYPT 1 +EOF + +fi +if test ${ac_cv_lib_crypt_crypt-no} = yes; then + LIBS=$ORIGLIBS +fi + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1776: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:1851: checking for pid_t" >&5 +if eval "test \"`echo '$''{'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 +#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 +else + rm -rf conftest* + 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 +#define pid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:1884: checking for size_t" >&5 +if eval "test \"`echo '$''{'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 +#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 +else + rm -rf conftest* + 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 +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:1917: checking for ssize_t" >&5 +if eval "test \"`echo '$''{'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 +#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 +else + rm -rf conftest* + 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 +#define ssize_t int +EOF + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1950: 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 $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + + +if test $ac_cv_header_netinet_in_h = no; then + ac_cv_struct_in_addr = no +else + if test $ac_cv_header_sys_types_h = yes; then + headers=`cat << EOF +#include +#include +EOF +` + else + headers="#include " + fi + + echo $ac_n "checking for struct in_addr""... $ac_c" 1>&6 +echo "configure:1999: checking for struct in_addr" >&5 +if eval "test \"`echo '$''{'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 + rm -rf conftest* + ac_cv_struct_in_addr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_in_addr=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_in_addr" 1>&6 + + if test $ac_cv_struct_in_addr = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_IN_ADDR 1 +EOF + + fi +fi + + +if test $ac_cv_header_sys_socket_h = no; then + ac_cv_socklen_t = no; +else + echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6 +echo "configure:2038: checking for typedef socklen_t" >&5 +if eval "test \"`echo '$''{'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:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_socklen_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_socklen_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_socklen_t" 1>&6 +fi + +if test $ac_cv_socklen_t = no; then + cat >> confdefs.h <<\EOF +#define socklen_t int +EOF + +fi + + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:2074: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2115: checking for vprintf" >&5 +if eval "test \"`echo '$''{'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(); + +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 +vprintf(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2143: \"$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:2167: checking for _doprnt" >&5 +if eval "test \"`echo '$''{'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(); + +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 +_doprnt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2195: \"$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:2222: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'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(); + +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 +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2250: \"$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:2280: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'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(); + +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 +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2308: \"$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 + +LIBS=$ORIGLIBS + + +ac_safe=accept; + +echo $ac_n "checking if accept is prototyped""... $ac_c" 1>&6 +echo "configure:2338: checking if accept is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_ACCEPT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=atoi; + +echo $ac_n "checking if atoi is prototyped""... $ac_c" 1>&6 +echo "configure:2395: checking if atoi is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_ATOI_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=atol; + +echo $ac_n "checking if atol is prototyped""... $ac_c" 1>&6 +echo "configure:2452: checking if atol is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_ATOL_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=bind; + +echo $ac_n "checking if bind is prototyped""... $ac_c" 1>&6 +echo "configure:2509: checking if bind is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_BIND_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=bzero; + +echo $ac_n "checking if bzero is prototyped""... $ac_c" 1>&6 +echo "configure:2566: checking if bzero is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_BZERO_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=chdir; + +echo $ac_n "checking if chdir is prototyped""... $ac_c" 1>&6 +echo "configure:2623: checking if chdir is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_CHDIR_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=close; + +echo $ac_n "checking if close is prototyped""... $ac_c" 1>&6 +echo "configure:2680: checking if close is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_CLOSE_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=crypt; + +echo $ac_n "checking if crypt is prototyped""... $ac_c" 1>&6 +echo "configure:2737: checking if crypt is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_CRYPT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fclose; + +echo $ac_n "checking if fclose is prototyped""... $ac_c" 1>&6 +echo "configure:2794: checking if fclose is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FCLOSE_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fcntl; + +echo $ac_n "checking if fcntl is prototyped""... $ac_c" 1>&6 +echo "configure:2851: checking if fcntl is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FCNTL_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fflush; + +echo $ac_n "checking if fflush is prototyped""... $ac_c" 1>&6 +echo "configure:2908: checking if fflush is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FFLUSH_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fprintf; + +echo $ac_n "checking if fprintf is prototyped""... $ac_c" 1>&6 +echo "configure:2965: checking if fprintf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FPRINTF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fputc; + +echo $ac_n "checking if fputc is prototyped""... $ac_c" 1>&6 +echo "configure:3022: checking if fputc is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FPUTC_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fputs; + +echo $ac_n "checking if fputs is prototyped""... $ac_c" 1>&6 +echo "configure:3079: checking if fputs is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FPUTS_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fread; + +echo $ac_n "checking if fread is prototyped""... $ac_c" 1>&6 +echo "configure:3136: checking if fread is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FREAD_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fscanf; + +echo $ac_n "checking if fscanf is prototyped""... $ac_c" 1>&6 +echo "configure:3193: checking if fscanf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FSCANF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fseek; + +echo $ac_n "checking if fseek is prototyped""... $ac_c" 1>&6 +echo "configure:3250: checking if fseek is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FSEEK_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=fwrite; + +echo $ac_n "checking if fwrite is prototyped""... $ac_c" 1>&6 +echo "configure:3307: checking if fwrite is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_FWRITE_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=getpeername; + +echo $ac_n "checking if getpeername is prototyped""... $ac_c" 1>&6 +echo "configure:3364: checking if getpeername is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_GETPEERNAME_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=getpid; + +echo $ac_n "checking if getpid is prototyped""... $ac_c" 1>&6 +echo "configure:3421: checking if getpid is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_GETPID_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=getrlimit; + +echo $ac_n "checking if getrlimit is prototyped""... $ac_c" 1>&6 +echo "configure:3478: checking if getrlimit is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_GETRLIMIT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=getsockname; + +echo $ac_n "checking if getsockname is prototyped""... $ac_c" 1>&6 +echo "configure:3535: checking if getsockname is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_GETSOCKNAME_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=gettimeofday; + +echo $ac_n "checking if gettimeofday is prototyped""... $ac_c" 1>&6 +echo "configure:3592: checking if gettimeofday is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_GETTIMEOFDAY_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=htonl; + +echo $ac_n "checking if htonl is prototyped""... $ac_c" 1>&6 +echo "configure:3649: checking if htonl is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_HTONL_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=htons; + +echo $ac_n "checking if htons is prototyped""... $ac_c" 1>&6 +echo "configure:3706: checking if htons is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_HTONS_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=inet_addr; + +echo $ac_n "checking if inet_addr is prototyped""... $ac_c" 1>&6 +echo "configure:3763: checking if inet_addr is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_INET_ADDR_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=inet_aton; + +echo $ac_n "checking if inet_aton is prototyped""... $ac_c" 1>&6 +echo "configure:3820: checking if inet_aton is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_INET_ATON_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=inet_ntoa; + +echo $ac_n "checking if inet_ntoa is prototyped""... $ac_c" 1>&6 +echo "configure:3877: checking if inet_ntoa is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_INET_NTOA_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=listen; + +echo $ac_n "checking if listen is prototyped""... $ac_c" 1>&6 +echo "configure:3934: checking if listen is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_LISTEN_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=ntohl; + +echo $ac_n "checking if ntohl is prototyped""... $ac_c" 1>&6 +echo "configure:3991: checking if ntohl is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_NTOHL_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=perror; + +echo $ac_n "checking if perror is prototyped""... $ac_c" 1>&6 +echo "configure:4048: checking if perror is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_PERROR_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=printf; + +echo $ac_n "checking if printf is prototyped""... $ac_c" 1>&6 +echo "configure:4105: checking if printf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_PRINTF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=qsort; + +echo $ac_n "checking if qsort is prototyped""... $ac_c" 1>&6 +echo "configure:4162: checking if qsort is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_QSORT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=read; + +echo $ac_n "checking if read is prototyped""... $ac_c" 1>&6 +echo "configure:4219: checking if read is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_READ_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=remove; + +echo $ac_n "checking if remove is prototyped""... $ac_c" 1>&6 +echo "configure:4276: checking if remove is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_REMOVE_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=rewind; + +echo $ac_n "checking if rewind is prototyped""... $ac_c" 1>&6 +echo "configure:4333: checking if rewind is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_REWIND_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=select; + +echo $ac_n "checking if select is prototyped""... $ac_c" 1>&6 +echo "configure:4390: checking if select is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SELECT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=setitimer; + +echo $ac_n "checking if setitimer is prototyped""... $ac_c" 1>&6 +echo "configure:4447: checking if setitimer is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SETITIMER_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=setrlimit; + +echo $ac_n "checking if setrlimit is prototyped""... $ac_c" 1>&6 +echo "configure:4504: checking if setrlimit is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SETRLIMIT_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=setsockopt; + +echo $ac_n "checking if setsockopt is prototyped""... $ac_c" 1>&6 +echo "configure:4561: checking if setsockopt is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_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:4618: checking if snprintf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:4675: checking if socket is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SOCKET_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=sprintf; + +echo $ac_n "checking if sprintf is prototyped""... $ac_c" 1>&6 +echo "configure:4732: checking if sprintf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SPRINTF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=sscanf; + +echo $ac_n "checking if sscanf is prototyped""... $ac_c" 1>&6 +echo "configure:4789: checking if sscanf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_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:4846: checking if strcasecmp is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:4903: checking if strdup is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:4960: checking if strerror is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_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:5017: checking if stricmp is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:5074: checking if strlcpy is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:5131: checking if strncasecmp is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:5188: checking if strnicmp is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_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:5245: checking if system is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_SYSTEM_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=time; + +echo $ac_n "checking if time is prototyped""... $ac_c" 1>&6 +echo "configure:5302: checking if time is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_TIME_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=unlink; + +echo $ac_n "checking if unlink is prototyped""... $ac_c" 1>&6 +echo "configure:5359: checking if unlink is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_UNLINK_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=vsnprintf; + +echo $ac_n "checking if vsnprintf is prototyped""... $ac_c" 1>&6 +echo "configure:5416: checking if vsnprintf is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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:5473: checking if write is prototyped" >&5 +if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # + if test $ac_cv_gcc_fnb = yes; then + OLDCFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fno-builtin" + fi +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* + if test $ac_cv_gcc_fnb = yes; then + CFLAGS=$OLDCFLAGS + fi + +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_WRITE_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + 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" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "src/Makefile src/util/Makefile src/conf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@MYFLAGS@%$MYFLAGS%g +s%@NETLIB@%$NETLIB%g +s%@CRYPTLIB@%$CRYPTLIB%g +s%@MORE@%$MORE%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +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 + +# +echo "Configuration completed. To compile, type: cd src; make" diff --git a/doc/FAQ.pdf b/doc/FAQ.pdf new file mode 100644 index 0000000..cdf10b5 Binary files /dev/null and b/doc/FAQ.pdf differ diff --git a/doc/OLD-DOCS/README b/doc/OLD-DOCS/README new file mode 100644 index 0000000..26f7dd2 --- /dev/null +++ b/doc/OLD-DOCS/README @@ -0,0 +1,34 @@ +This directory contains documentation on various aspects of the game. + +Area builders will be most interested in database.doc, dbsup.doc, defs.doc, +shop.doc, and values.doc. These five files can be mailed automatically +with the "do_mail" script in this directory. do_mail takes the recipient +as its only command-line argument. For example, to mail the documentation +to CircleMUD's author, you'd type "do_mail jelson@cs.jhu.edu". + +CONTENTS: +-------- + +COLOR.DOC - Programmer's manual on how to use color codes +COMM.DOC - The game-to-player communications system, most importantly + the act() procedure +DATABASE.DOC - The format of the most important data files +DBSUP.DOC - Detailed information on each field in database.doc +DEFS.DOC - Important document on what rules should be followed + when creating a part of the world, to avoid complete chaos +HACKER.DOC - Insight into the art & science of programming (courtesy MERC) +HANDLER.DOC - Descriptions of most of the basic 'database handling' + procedures, found in handler.c +LICENSE.DOC - The conditions under which this game is distributed + NOTE: THIS FILE MUST ALWAYS BE PRESENT +RELEASE.DOC - CircleMUD release history +RUNNING.DOC - Directions for compiling, running, and maintaining the game +SHOP.DOC - Describes how to create a shop file +SOCIALS.DOC - Description of the 'social action' system +SPELL_INFO.DOC - Doc on spells, especially how damage is calculated +SPELLS.DOC - Info on the spell/affection system +TIME.DOC - How time is in DikuMud compared to real world +UTILS.DOC - Description of the CircleMUD maintenance utilities +VALUES.DOC - The 4 generic values for items, described in detail +WIZHELP.DOC - Description of all god commands + diff --git a/doc/OLD-DOCS/README-DOCS b/doc/OLD-DOCS/README-DOCS new file mode 100644 index 0000000..890ea08 --- /dev/null +++ b/doc/OLD-DOCS/README-DOCS @@ -0,0 +1,9 @@ + +3/6/95 +----- + +This directory contains the documentation distributed with CircleMUD 2.2. +This directory and all the files in it will eventually disappear. They +are here now to serve as a reference while I write the new documentation. + +--JE diff --git a/doc/OLD-DOCS/coding.doc b/doc/OLD-DOCS/coding.doc new file mode 100644 index 0000000..b23b967 --- /dev/null +++ b/doc/OLD-DOCS/coding.doc @@ -0,0 +1,31 @@ +/************************************************************************** +* Copyright (C) 1993 - see 'license.doc' for complete information. * +**************************************************************************/ + + HOW TO CONVERT YOUR IDEAS INTO REALITY + A CircleMUD Coding Manual + +Table of Contents +--------------------------------------------------------------------------- + +i. Introduction + +1. Overview and Coding Basics + 1.1. The Way Things Work -- Overview + 1.2. CircleMUD's Structures and Lists + 1.3. Frequently Used Functions + +2. Changing the Code + 2.1. Adding Commands + 2.2. Adding Socials + 2.3. Adding Spells + 2.4. Adding Skills + 2.5. Writing Special Procedures + 2.6. Adding Classes + + 2.9. Adding Color + +3. Changing the World + 3.1. Adding Areas + 3.2. Removing Areas + 3.2. Writing Areas diff --git a/doc/OLD-DOCS/color.doc b/doc/OLD-DOCS/color.doc new file mode 100644 index 0000000..1e1dfce --- /dev/null +++ b/doc/OLD-DOCS/color.doc @@ -0,0 +1,134 @@ +/************************************************************************** +* Copyright (C) 1993 - see 'license.doc' for complete information. * +**************************************************************************/ + + USING COLOR IN CIRCLEMUD + "color.doc" + +CircleMUD allows you to create colorful messages by using ANSI control +sequences. Each player may select what "level" of color he/she desires +from the four levels "off", "sparse", "normal", and "complete." Each +player can select his/her color level by using the COLOR command from +within the MUD; you as the programmer must decide which messages will be +colored for each of the color levels. + +All files in which you wish to use color must have the line: + +#include "screen.h" + +after all other includes in the beginning of the file. + +There are 8 colors available -- "normal", red, green, yellow, blue, magenta, +cyan and white. They are accessible by sending control sequences as part of +another string, for example: + +sprintf(buf, "If you're %shappy%s and you know it clap %d of your hands.\n\r", + x, y, num_of_hands); +send_to_char(buf, ch); + +In this example, x and y are the "on" and "off" sequences for the color you +want. There are 2 main series of color macros available for you to use +(don't actually use "x" and "y", of course!): the K series and the CC series. +The CC (Conditional Color) series is recommended for most general use. + +The name of the actual sequence starts with the name of its series, plus +a 3-letter color code, as follows: + +Normal : NRM +Red : RED +Yellow : YEL +Green : GRN +Blue : BLU +Magenta: MAG +Cyan : CYN +White : WHT + +For example, white in the K series is KWHT; blue in the CC series +is CCBLU() (arguments defined below). + +The K series requires no arguments, and is simply a macro to the ANSI +color code. Therefore, if you use a K-series color code, the color will +ALWAYS be sent, even if the person you're sending it to has color off. +This is very bad -- people who do not have ANSI-compatible terminals +will see garbage characters instead of colors. The K series is mainly +used to print colors to a string if the player's color level will later +be tested manually (for an example, see do_gen_com in act.comm.c). + +The recommended series is the CC series (i.e. CCNRM(), CCRED(), etc.) +The CC series macros require two arguments -- a pointer to the character +to whom the string is being sent, and the minimum color level the player +must be set to in order to see the color. Color sent as 'sparse' (C_SPR) +will be seen by people with color set to sparse, normal, or complete; +color sent as 'normal' (C_NRM) will be seen only by people with color +set to normal or complete; color sent as 'complete' (C_CMP) will be seen +only by people with color set to complete. + +To illustrate the above, an example is in order: + +#include "screen.h" /* include screen.h in all files that you use color in */ + +ACMD(do_showcolor) +{ + char buf[300]; + + sprintf(buf, "Don't you just love %scolor%s, %scolor%s, %sCOLOR%s!\n\r", + CCBLU(ch, C_CMP), CCNRM(ch, C_CMP), + CCYEL(ch, C_NRM), CCNRM(ch, C_NRM), + CCRED(ch, C_SPR), CCNRM(ch, C_SPR)); + send_to_char(buf, ch); +} + +What does this do? For people with color set to Complete, it prints: + + Don't you just love color, color, COLOR! + (blue) (yellow) (red) + +People who have color set to Normal will see: + + Don't you just love color, color, COLOR! + (yellow) (red) + +People who have color set to Sparse will see: + + Don't you just love color, color, COLOR! + (red) + +People who have color set to Off will see: + + Don't you just love color, color, COLOR! + (no color, as you'd expect) + + +There are several common pitfalls with using the CC series of color macros: + +* Do not confuse CCNRM with C_NRM. CCNRM() is a macro to turn the color + back to normal; C_NRM is a color level of "normal". + +* Always make sure that every pair of "on" and "off" codes are at the + same color level. For example: + + WRONG: sprintf(buf, "%sCOLOR%s\n\r", CCBLU(ch, C_NRM), CCNRM(ch, C_CMP)); + + This is wrong because if someone has their color level set to Normal, + the CCBLU code will be sent but the CCNRM command will not, causing all + subsequent output to be blue. + + WRONG: sprintf(buf, "%sCOLOR%s\n\r", CCBLU(ch, C_CMP), CCNRM(ch, C_NRM)); + + The above statement is also wrong, although not as bad. In this case, + someone with color set to Normal will (correctly) not get the CCBLU code, + but will then unnecessarily get the CCNRM code. Never send a color code if + you don't have to -- the codes are several bytes long, and cause a noticable + pause at 2400 baud. + +* This should go without saying, but don't ever send color at the C_OFF + level. + +* Special precautions must be taken when sending a colored string to a + large group of people -- you can't use the color level of "ch" (the + person sending the string) -- each person receiving the string must + get a string appropriately colored for his/her level. In such cases, + it's usually best to set up two strings (one colored and one not), + and test each player's color level individually (see do_gen_com in + act.comm.c for an example). + diff --git a/doc/OLD-DOCS/comm.doc b/doc/OLD-DOCS/comm.doc new file mode 100644 index 0000000..48bdf83 --- /dev/null +++ b/doc/OLD-DOCS/comm.doc @@ -0,0 +1,146 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + +Descriptions of the message-to-character routines of comm.c + + + +void send_to_char(char *messg, struct char_data *ch) +Places messg in the output queue for ch, for later sending. + +void send_to_all(char *messg) +Sends a message to all players. + +void send_to_except(char *messg, struct char_data *ch) +Sends to all players, except the one pointed to by ch. + +void send_to_room(char *messg, int room) +Sends messg to all players in the room. + +void send_to_room_except(char *messg, int room, struct char_data *ch) +Send to all in room, with the exception of ch. + + +The following routine takes the place of all the old perform-routines. It is +to gradually replace these in the old code, and is to be used exclusively in +all additions. + + +FUNCTION ACT --- Process and send string to characters in a room. + +SYNOPSIS + +#include "comm.h" + +act(string, hide_invisible, ch, obj, vict_obj, type) + +char *string; /* the string to send */ +int hide_invisible, /* hide the action if vict can't see us? */ + type; /* who gets the string */ +struct char_data *ch; /* the 'performing' character */ +struct obj_data *obj; /* an object */ +void *vict_obj; /* an object OR a char OR an ascii string */ + + +DESCRIPTION + +This function is used to send a string to one or more characters in a room. The +string may contain certain control characters which are expanded before the +string is sent. + +Obj and vict_obj are ignored if no reference is made to them (via CONTROL +CHARACTERS), and if type (see below) is set to TO_ROOM. Thus, null-pointers +may be supplied in this case. Ch should always be defined. If String is a +null-pointer or if string points to a null-character, nothing will be sent. + +When the string has been parsed, it is capitalized and a newline is added. + + CONTROL CHARACTERS + +Each control character is preceded by a '$'. + + $n - Write name, short description, or "someone", for ch, depending on + whether ch is a PC, a NPC, or an invisible PC/NPC. + + $N - Like $n, except insert the text for vict_obj. NOTE: vict_obj must + point to an object of type struct char_data. + + $m - "him", "her", or "it", depending on the gender of ch. + + $M - Like $m, for vict_obj. NOTE: vict_obj must be a pointer of type + struct char_data. + + $s - "his", "her", or "it", depending on the gender of ch. + + $S - Like $s, for vict_obj. + + $e - "he", "she", "it", depending on the gender of ch. + + $E - Like $e, for vict_obj. + + $o - Name or "something" for obj, depending on visibility. + + $O - Like $o, for vict_obj. NOTE: vict_obj must be a pointer of type + struct obj_data. + + $p - Short description or "something" for obj. + + $P - Like $p for vict_obj. + + $a - "an" or "a", depending on the first character of obj's name. + + $A - Like $a, for vict_obj. + + $T - Prints the string pointed to by vict_obj. + + $F - Processes the string pointed to by vict_obj with fname() prior to + printing. + + $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. -- CircleMUD addition (09/18/00) + + $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. -- CircleMUD addition (09/18/00) + + $$ - Print the character '$'. + + HIDE_INVISIBLE + +If this parameter is nonzero, the action will be hidden to those who are +unable to see ch. + + TYPE + +This value determines who the string is sent to. It may take one of four +values (the macros are defined in comm.h). + +TO_ROOM - Send the string to everybody in the room, except ch. +TO_VICT - Send the string to the character (!) pointed to by vict_obj. +TO_NOTVICT - Send the string to everybody in the room except ch and vict_obj. +TO_CHAR - Send the string to the ch. + + +EXAMPLES + +act("$n smiles happily.", TRUE, ch, 0, 0, TO_ROOM); + +(eg: Rainbird smiles happily.) + +act("You kiss $M.", FALSE, ch, 0, vict, TO_CHAR); + +(eg: You kiss her.) + +act("$n gives $p to $N.", TRUE, ch, obj, vict, TO_NOTVICT); + +(eg: Dave gives a small sword to the giant.) + +act("$n gives you $p.", FALSE, ch, obj, vict, TO_VICT); + +(eg: Dave gives you a small sword.) + +act("$n puts $p in $s $O.", TRUE, ch, obj1, obj2, TO_ROOM); + +(eg: Jones puts a small sword in his sack.) diff --git a/doc/OLD-DOCS/database.doc b/doc/OLD-DOCS/database.doc new file mode 100644 index 0000000..7d5d796 --- /dev/null +++ b/doc/OLD-DOCS/database.doc @@ -0,0 +1,389 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + + DATABASE DOCUMENTATION + "database.doc" + + +1. The world file: +================== + +This file contains all the rooms, and is loaded once and for all at +boot-time. It follows the this format: + +-------------------------------------------- +# +~ +~ + + + +{} +'S' +# + +. +. +. + +#99999 +$~ + +Explanation of fields: +---------------------- + + follow this format: + +D +~ +~ + + +Extra descriptions +------------------ + +Format: + +'E' +~ +~ + + +----- +NOTE: + +All the text fields above may be left blank, but the '~' should always be +there. + +On the 'virtual' number: + +Since the rooms for this game are expected to be written by several people, +we have made it possible to number the rooms freely. Thus, it is possible to, +say, number the rooms in zone 0 from 0 to 1000, the rooms in zone 1 from 1000 +to 2000, and so on. Rooms can then be added to the room file without +upsetting the various references to rooms. In the reset command-tables, as well +as in the exits, references to a given room are made via the virtual number +rather than the array index. At boot-time, these references are substituted +with the actual array indices in order to improve the game-time execution +speed. In such places (ie the special routines for mobs/objs/rooms) where +this substitution cannot take place, a function 'real_room', with prototype + + int real_room(int virtual_number) + +must be used. This functions performs a binary search on the array of rooms, +looking for a room with a given virtual number. If found, the function +returns the index to this room; if not, the game is halted. + +Note: Since a binary search is used, the rooms MUST be sorted (in the +room-file) after their virtual number. + +----------------------------------------------------------------------------- + +2. Objects and monsters +======================= + +The objects and mobiles are stored in two separate files. They are loaded +once at boot-time, and then each time their zone is reset, according to the +information stored in the ZONE-FILE. + +The world is split up into a number of zones that are updated independently. +The exact nature of these updates are defined by the contents of the ZONE-FILE. + + +----------------------------------------------------------------------------- + +2.1. The Monster file: +====================== + +The format of this file is as follows: + + +# +~ +~ +~ +~ + + +IF != 'S' { + + + + + + + +} else { /* Simple monsters flag is 'S' */ + + + + + +} +# + +. +. +. + +# +$~ + + + +----------------------------------------------------------------------------- + +2.3. The object file: +===================== + + +The format is as follows: + +# +~ +~ +~ +~ + + + +'E' +~ +~ +'E' +~ +~ +. +. +. +'E' +~ +~ +'A' + +. +. +'A' + +# + +. +. +. + +# +'$~' + +----------------------------------------------------------------------------- + +2.3. The zone-file +================== + +The zone-file contains the following information for each zone: + +a) The top room-number of the zone. A room belongs to a zone X if: + + zone[X-1].top < virtual_room_number <= zone[X] + +for X > 0. Rooms belong to zone 0 if their number is between 0 and the +top of zone 0. + +b) The LIFESPAN of the zone. When the age of the zone (measured in minutes +after last reset) reaches this number, the zone is queued for reset. The +zone is then reset as soon as possible (more or less), depending on the +value of the RESET_MODE-variable. + +c) The RESET_MODE. This may take on of three values: + + 0: Don't reset the zone at all. 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-field is effectively ignored. + + 1: Reset the zone as soon as it is deserted, ie as soon as there are no + players located within the zone. + + 2: Reset the zone no matter who or what is in it. + +d) The COMMAND TABLE. This is a series of commands to execute at reset. The + table is terminated by the pseudo-command 'S', and thus follows the + following format: + + + + + . + . + . + + + 'S' + + 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 it is true (nonzero), the command is executed + ONLY if the preceding command was executed. If it is false (zero), the + command is executed anyway. + + The commands: + + M (load a mobile): + Format: 'M' + + mobile nr and room nr should be self-explanatory. The 'max + existing' parameter specifies the maximum permissible number of + existing units. In other words: If you only want one manifestation + of a given monster, you just specify the number '1'. If the max + number is about to be exceeded, the command won't be executed. + + O (load an object): + Format: 'O' + + Load an object and place it in a room. (NOT -1) + + G (give object to mobile): + Format: 'G' + + Loads an object, and gives it to the last monster referenced (ie. by the + M-command). + + Of course, this command doesn't make sense if a new mobile+object + pair has not just been created, which is where the if-flag comes + in handy. :) + + E (object to equipment list of mobile) + Format: 'E' + + Loads object and places it in the Equipment list of the last monster + referenced. + + Note that it is NOT necessary to precede this command with a 'G' command. + Equipment position is one of: + WEAR_LIGHT 0 + WEAR_FINGER_R 1 + WEAR_FINGER_L 2 + WEAR_NECK_1 3 + WEAR_NECK_2 4 + WEAR_BODY 5 + WEAR_HEAD 6 + WEAR_LEGS 7 + WEAR_FEET 8 + WEAR_HANDS 9 + WEAR_ARMS 10 + WEAR_SHIELD 11 + WEAR_ABOUT 12 + WEAR_WAISTE 13 + WEAR_WRIST_R 14 + WEAR_WRIST_L 15 + WIELD 16 + HOLD 17 + + + P (put object in object): + Format: 'P' + + Loads object1 and places it in object2. + + D (set state of door) + Format: 'D' + + State being one of: + 0: Open. + 1: Closed. + 2: Closed and locked. + + R (remove object from room) + Format: 'R' + + + More commands will probably be needed, and will be added as required. + + +Format of the zone-file: + +--------------------------------------- +# +~ + + + + + + +. +. +. + + +'S' +# + +. +. +. + +# +$~ + + + + + + + +2.2. The monster file: +---------------------- + +The format of this file is as follows: + + +---------------------------------------------- +# +~ +~ +~ +~ + + +IF != 'S' { + + + + + + + +} else { /* Simple monsters flag should be 'D' */ + + + + + +} +# + +. +. +. + +# +$~ +---------------------------------------------- + +On the skill fields: + +Format: +-------------- +S + +-------------- + +On the virtual numbers: + +This number may be considered the 'label' of the mobile, for use in eg. the +zonefile (see also the text about the roomfile format). When the mobile is to +be referenced from within the code itself, the function real_mobile +(real_object for objects) can be used to find indices to the file-index tables +(this is only of use when writing special routines). These functions are +automatically called from read_object/read_mobile, depending on their 'type' +parameter (see db.doc). diff --git a/doc/OLD-DOCS/dbsup.doc b/doc/OLD-DOCS/dbsup.doc new file mode 100644 index 0000000..f10ce00 --- /dev/null +++ b/doc/OLD-DOCS/dbsup.doc @@ -0,0 +1,600 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + + DATABASE SUPPLEMENTAL DOCUMENTATION + "dbsup.doc" + + +World File field description: +============================= + +Main structure notes: +--------------------- + +# is: + A number for the given room. No two rooms may have the same number. + The must always increase when browsing down the + world file (but increments can be larger than one). + +~: + This name is the "title" of the room. This title is also used in special + procedures like: + "exits" + "brief mode" + +~: + This is the general description of the room. + + is: + The number of the zone in which this room is located. This number is used + for resetting zones and monster zone movement. See the zone file. + + are: + A bitvector consisting of the room conditions as: + + DARK 1 Light must be used to see anything. + DEATH 2 A player 'dies' (no xp lost) when entering. + It is a good idea to: + *Have these rooms light, because then EXITS will show + the room title, for example "In Boiling Water". + *Make exits to all rooms from which one can enter the + death_room, then the "death cry" will be heard by + other members of the group considering following... + NO_MOB 4 No monsters may walk around in here + INDOORS 8 This is inside (a house,cave or dungeon for example) + LAWFULL 16 ??? + NEUTRAL 32 ??? + CHAOTIC 64 ??? + NO_MAGIC 128 Not implemented. + TUNNEL 256 ??? + PRIVATE 512 It is impossible to teleport to this room if it + already contains two characters. The 'teleport' + spell will never teleport a player into this room. + GODROOM 1024 Super-private room: Immortals can not 'goto' this room. + BFS_MARK 2048 RESERVED FOR INTERNAL USE -- do not use. + +??? means that the flag isn't used yet (and you Shouldn't use it either!) + + + is: + This determines how many movement points are used when moving through + a location of the type - use one of the numbers 0..7 (they are NOT the + movement-points used - merely indexes to a lookup-table): + + SECT_INSIDE 0 Uses as if walking indoors + SECT_CITY 1 Uses as if walking in a city + SECT_FIELD 2 Uses as if walking in a field + SECT_FOREST 3 Uses as if walking in a forest + SECT_HILLS 4 Uses as if walking in hills + SECT_MOUNTAIN 5 Uses as if climbing in mountains + SECT_WATER_SWIM 6 Uses as if swimming + SECT_WATER_NOSWIM 7 Impossible to swim water - requires a boat + + +Direction fields: +----------------- + + is one of: + 0 = North + 1 = East + 2 = South + 3 = West + 4 = Up + 5 = Down + +~: + What a player will see if he types 'look ' + +~: + used for commands like 'open', 'close', etc. should be 'door' for ordinary + doors. Example: An exit from a given room leads through a cupboard. The + keyword list for this exit might look like this: + + "cupboard door~" + + + [NL]: + + If is 1, the exit can be locked/unlocked/opened/closed/picked. + If it is 2, the exit can only be locked/unlocked/opened/closed. + If it is 0, these commands won't work. (The exit can still be closed at + reset, however; maybe to be opened by some special routine, like a concealed + handle). + + The state of the doors after reset may be controlled by a command in the + reset-command table (see the zone file). The initial state of a door is + open. + + [NL]: + The number of the object which can unlock/lock the door (in the direction + given). If a player carries/holds this object, he can lock/unlock. + == -1 means no keyhole. If is 0, the value of this + field is ignored. + + : + The virtual number of the room to which the exit leads. If this number is + -1 (NOWHERE), the exit doesn't lead anywhere. This might be useful for + adding an exit-description in a direction which doesn't actually lead + anywhere. + +** Note about doors. You must make a door in both rooms that the door + is set between. + +Extra descriptions: +------------------- + +~ is: + A list of the keywords that will allow the extra description to be + displayed. The keywords must must be seperated by blanks. + + +~: + The description that is show when a player types 'look at ' + and keyword matches one of the above. + + +Example of a room entry is the database: +---------------------------------------- + +#100 +The Lego temple~ + You stand in a tiny, red temple built entirely from Lego bricks. It is, +sadly, not a very interesting place, and perhaps you should leave through +the portal which leads south to a sunny garden. +~ +1 12 0 +D2 +You see the grand portal of the Lego church. Beyond is an inviting garden. +~ +portal grand~ +1 2 107 +E +portal~ +The portal is high and arched, built out of lego bricks of the finest quality. +~ +E +brick~ +The bricks are all in bright different colours. +~ +S +#101 +. +. +. + +Facts about this room is: + Room number 100 + Zone number 1 + Room Flags (8+4=12) INDOORS and NO_MOB + Sector Type Inside (movement loss calc only) + One exit (D2) to the south with 'look south' description + Door Flag 1 + Key no. 2 + Leads to room 107 + Extra description for the portal and bricks. + +------------------------------------------------------------------------- + +Monster fields description: +=========================== + +# is: + The monsters virtual number. Rules are same as for room virtual numbers. + +~ + The space-separated name alias list. + +~ + This string will be displayed when the monster take action, for example + if it is "The Beastly Fido", and fido leaves south the message will be + "The Beastly Fido leaves south." + +~ + This description is displayed when the monster is in it's "default" + position. When not in the default position, a message like: + " is sleeping here." could be displayed. + +~ + This will be displayed when a player looks at the monster. + +[NL] + + This bitvector define how the monster behave. The bits mean: + + ACT_SPEC 1 This means that there is a special programmed C + procedure connected to the monster. When this bit + is set the monster "function pointer" must be + assigned in the "spec_assign.c" file. + + ACT_SENTINEL 2 When this bit is set the monster will NOT + move around in the world. + + ACT_SCAVENGER 4 When this bit is set, monsters will pick up stuff + lying on the ground. It will pick up the most + expensive items first. + + ACT_ISNPC 8 RESERVED FOR INTERNAL USE + + ACT_NICE_THIEF 16 When this bit is set, a monster will not attack + a thief which has been caught in the act of + stealing from this monster. + + ACT_AGGRESSIVE 32 When this bit is set, the monster will attack and + attempt to kill any player it can get it's claws on. + It will not attack players it can't see (for example + dark rooms or when player is invisible, unless the + monster can detect invisibility) + + ACT_STAY_ZONE 64 When this bit is set, the monster will never move + into another zone of the world (this is good for + keeping your monsters in your own adventure). + + ACT_WIMPY 128 When this bit is set, the monster will flee when it's + getting percentwise low on hitpoints. + If the monster is both aggressive and wimpy, then it + will only attack players that are NOT awake! (ie. also + suffering players). + + ACT_AGGRESSIVE_EVIL + 256 When this bit is set, the monster will attack players + with evil alignment. + + ACT_AGGRESSIVE_GOOD + 512 When this bit is set, the monster will attack players + with good alignment. + + ACT_AGGRESSIVE_NEUTRAL + 1024 When this bit is set, the monster will attack players + who are neutrally aligned. + + ACT_MEMORY 2056 When this bit is set, the monster will remember + players who attack it, and attack the player back + if it sees him or her again. + +[NL] + + This is a bitvector that indicates what the monster is affected by. + Puff could for example be able to "detect invisible" or maybe + "sanctuary" (1/2 damage). A lot of these bits are meant for players + only (in a context with a spell), and should NOT be used when indicated. + The bits are: + + AFF_BLIND 1 RESERVED PLAYERS + AFF_INVISIBLE 2 The monster is invisible + AFF_DETECT_EVIL 4 RESERVED PLAYERS + AFF_DETECT_INVISIBLE 8 The monster can see invisible players + (Especially good for aggressive npc's) + AFF_DETECT_MAGIC 16 RESERVED PLAYERS + AFF_SENCE_LIFE 32 RESERVED PLAYERS + AFF_HOLD 64 ??? DO NOT USE + AFF_SANCTUARY 128 The monster has sanctuary (1/2 damage) + AFF_GROUP 256 RESERVED PLAYERS + AFF_CURSE 1024 ??? DO NOT USE + AFF_FLAMING 2048 ??? DO NOT USE + AFF_POISON 4096 RESERVED PLAYERS + AFF_PROTECT_EVIL 8192 ??? DO NOT USE + AFF_PARALYSIS 16384 ??? DO NOT USE + AFF_MORDEN_SWORD 32768 ??? DO NOT USE + AFF_FLAMING_SWORD 65536 ??? DO NOT USE + AFF_SLEEP 131072 RESERVED PLAYERS + AFF_DODGE 262144 ??? DO NOT USE + AFF_SNEAK 524288 The message "The xxx leaves direction" will + not be displayed when the monster moves + out/in to a room. + AFF_HIDE 1048576 The monster will be hidden, and can only + be detected by a "sense life" spell + AFF_FEAR 2097152 ??? DO NOT USE + AFF_CHARM 4194304 The monster will act as charmed when a + "follow " is entered. Note that + players can't force monsters to follow + them. + AFF_FOLLOW 8388608 RESERVED PLAYERS + AFF_WIMPY 16777216 RESERVED PLAYERS + AFF_INFRARED 33554432 Allows monsters to see in the dark. + +[NL] + + This is the monsters alignment, read as: + +1000 .. +350 Good Alignment + +349 .. -349 Neutral Alignment + -350 ..-1000 Evil Alignment + + + + This flag must be entered as a uppercase "S". S indicates that "Simple" + monster data follow. Anything but an S will be interpreted as if + "Detailed" monster data is to follow. We will NOT describe detailed + monsters as they are VERY detailed. + + + + This is the level of the monster. See "defs.doc" for guidelines when + setting the level. + + + The monsters THAC0. + See the file "defs.doc" for an explanation of armour vs. THAC0, and + guidelines for THAC0. + THAC0 is an abbrevation for "To Hit Armour Class Zero". + + + The monsters armour class. See "defs.doc" for guidelines regarding + armour. + + + This defines the number of hitpoints a given monster has. If this is + entered into the file: + + ... ... 3d8+10 ... + + the monster will have 10 hitpoints plus the result of rolling 3 dice + with 8 side, and adding their sum. All the numbers (even zero), the + plus sign, and the letter 'd' MUST be entered!!! Example: + + ..... 1d6+0 .... + + + + This is the damage a monster will cause when it is using NO weapons + (the Bare hand damage). The format is exacly like the one described + for hit points. A thing to note about damage: + The number after the plus sign, is the "strength bonus". This bonus + will apply to any weapons used, and bare hands too. Example: + + ..... 1d4+10 + + This monster will damage between 11 and 14 hitpoints each round. If the + monster picks up and wields a tiny stick which give 1d2 damage, then the + monster will now damage by : 1d2 + 10 points. + + + The amout of gold carried by the monster. + + + The experience this monster has. Follow guidelines in "defs.doc". + + + This defines the monster's position when loaded into the game. + A position is one of: + + POSITION_DEAD 0 DO NOT USE + POSITION_MORTALLYW 1 DO NOT USE + POSITION_INCAP 2 DO NOT USE + POSITION_STUNNED 3 DO NOT USE + POSITION_SLEEPING 4 The monster is sleeping. + POSITION_RESTING 5 The monster is resting. + POSITION_SITTING 6 The monster is sitting. + POSITION_FIGHTING 7 DO NOT USE. + POSITION_STANDING 8 The monster is standing. + + + + This is the position into which the monster will return after + a fight. This position also defines when the + is displayed - see above. + + + This is the monsters sex, on of: + + SEX_NEUTRAL 0 + SEX_MALE 1 + SEX_FEMALE 2 + + No further explanation is needed (hopefully). + + +Object fields description: +========================== + +# + See rules for rooms above. + +~: + Same as for monsters above. + +~ + This string will be displayed when the object is used. For example + if it is "a rubber raft", and a player drops it, then a message like: + "Monthy drops a rubber raft." + could be displayed. + +~ + This description is displayed when the object is lying on the ground. + For example, if it is "A furled umbrella lies here.~" then this message + is displayed when the umbrella is lying on the ground. + +~ + Do not use. + +[NL] + This defines what kind of item you are defining, it can be one of: + + ITEM_LIGHT 1 Item is a light. + ITEM_SCROLL 2 Not yet implemented + ITEM_WAND 3 Not yet implemented + ITEM_STAFF 4 Not yet implemented + ITEM_WEAPON 5 Item is a weapon + ITEM_FIREWEAPON 6 Not yet implemented + ITEM_MISSILE 7 Not yet implemented + ITEM_TREASURE 8 Item is a treasure (not money) + ITEM_ARMOR 9 Item is armour. + ITEM_POTION 10 Not yet implemented + ITEM_WORN 11 ??? + ITEM_OTHER 12 Item is other + ITEM_TRASH 13 Item is trash + ITEM_TRAP 14 Not yet implemented + ITEM_CONTAINER 15 Item is a container + ITEM_NOTE 16 Item is a note that can be written upon (with a pen) + ITEM_DRINKCON 17 Item is a drink container, for example a bottle or + a barrel or a wine-skin. + A drinkcontainer whit contents must *always* have + two names: 1. The name of the drink, 2. the name + of the container, example: + tea cup~ + + ITEM_KEY 18 Item is a key + ITEM_FOOD 19 Item is food. + ITEM_MONEY 20 Item is money. + ITEM_PEN 21 Item is a pen. + ITEM_BOAT 22 Item is a boat, which must be carried by a player if + the player wishes to enter NOSWIM room sector types. + ITEM_FOUNTAIN 23 Item is a fountain (characters can drink from it + without having it in inventory). + +[NL] + This bitvector defines mostly special effects: + + ITEM_GLOW 1 The item is glowing. + ITEM_HUM 2 The item is "humming"/"buzzing". + ITEM_DARK 4 ??? + ITEM_LOCK 8 ??? + ITEM_EVIL 16 ??? + ITEM_INVISIBLE 32 Item is invisible. + ITEM_MAGIC 64 Item will show a magical aura when 'detect magic' + is used. + ITEM_NODROP 128 Item can not be dropped (cursed for example) + ITEM_BLESS 256 Item is blessed. + ITEM_ANTI_GOOD 512 Item not usable by good people + ITEM_ANTI_EVIL 1024 Item not usable by evil people + ITEM_ANTI_NEUTRAL 2048 Item not usable by neutral people + ITEM_NORENT 4096 Players can not rent item + ITEM_NODONATE 8192 Players can not donate item + ITEM_NOINVIS 16384 Player can not make item invisible + + + This bitvector defines if items can be taken, and if they can be worn: + + ITEM_TAKE 1 Item is takeable. + ITEM_WEAR_FINGER 2 Can be worn on a finger (rings usually) + ITEM_WEAR_NECK 4 Can be worn around neck. + ITEM_WEAR_BODY 8 Can be worn on body. + ITEM_WEAR_HEAD 16 Can be worn on head. + ITEM_WEAR_LEGS 32 Can be worn on legs. + ITEM_WEAR_FEET 64 Can be worn on feet + ITEM_WEAR_HANDS 128 Can be worn on hands (gauntlets, etc) + ITEM_WEAR_ARMS 256 Can be worn on arms. + ITEM_WEAR_SHIELD 512 Can be used as a shield. + ITEM_WEAR_ABOUT 1024 ??? + ITEM_WEAR_WAISTE 2048 Can be worn around the waiste (belt) + ITEM_WEAR_WRIST 4096 Can be worn on wrist (bracelets) + ITEM_WIELD 8192 Can be wielded and used as a weapon + ITEM_HOLD 16384 Item can be held in a hand. + ITEM_THROW 32768 Not yet implemented. + Item can be thrown. + + + These values are very central. They define the ability of items based on + the items . These values are defined in "values.doc". Note that + if you define an item as being anything but a weapon, you shouldn't set + the 'wield' flag. Many similar obvious rules apply. Example of 4 values: + + If the == ITEM_CONTAINER then the values are interpeted as: + + Value[0]: Maximum weight the container can contain. + Value[1]: Container flags: + + CLOSEABLE - 1 + PICKPROOF - 2 + CLOSED - 4 + LOCKED - 8 + + Value[2]: The item-number of the object which can open the object. + -1 means no lockability. + Value[3]: Internal use for Corpses that must "rot". + + +[NL] + The weight of the item in pounds. + +[NL] + The value of the item if sold - see "defs.doc" for ideas on prices. + + + The cost to store the item in the reception overnight. + + + + +Several extra descriptions or none at all may appear. They follow the room +format exactly. + +'E' +~ + Exactly as in rooms. + +~ + Exactly as in rooms. + + + +Between zero and two "affect's" may be set on an item. The affects could +for example modify a characters strength, height etc. The affect only goes +into affect when the character wear, wield or hold the item. The affect +is removed when the character removes the items. + +'A' + When items are worn using wear/wield/grab/hold commands, the 'A' will + allow the items to affect a characters various abilities. Currently + a maximum of 2 'A' are allowed. + +[NL] + is one of the below numbers, indicating which ability + will be changed. + + APPLY_NONE 0 DO NOT USE. + APPLY_STR 1 + APPLY_DEX 2 + APPLY_INT 3 + APPLY_WIS 4 + APPLY_CON 5 + APPLY_SEX 6 DO NOT USE. + APPLY_CLASS 7 DO NOT USE. + APPLY_LEVEL 8 DO NOT USE. + APPLY_AGE 9 + APPLY_CHAR_WEIGHT 10 + APPLY_CHAR_HEIGHT 11 + APPLY_MANA 12 DO NOT USE. + APPLY_HIT 13 The MAXIMUM number of hitpoints. + APPLY_MOVE 14 DO NOT USE. + APPLY_GOLD 15 DO NOT USE. + APPLY_EXP 16 DO NOT USE. + APPLY_AC 17 + APPLY_ARMOR 17 Same as APPLY_AC + APPLY_HITROLL 18 The bonus/penalty to hit the opponent. + APPLY_DAMROLL 19 The bouns/penalty to damage the opponent. + APPLY_SAVING_PARA 20 These five are saving throws. + APPLY_SAVING_ROD 21 + APPLY_SAVING_PETRI 22 + APPLY_SAVING_BREATH 23 + APPLY_SAVING_SPELL 24 This is the most used saving throw. + + + + + The modifier is added to the APPLY_XXX ability of the character + when he uses an item, and is subtracted when he stops using it. + Take great care when using this. This is an example of an item of + improve strength and armour class. Example: + + A + 1 2 + A + 17 -2 + + This adds +2 to the strength, and adds -2 to the AC (thus improving it). + No more 'A'ffects is allowed at this time. + +------------------------------------------------------------------------- + +Abbrevations: +============= + + indicates that the contents MUST be entered. + +[contents] indicates that the contents can OPTIONALLY be entered. + + is Newline (return) + +! This indicates "NOT" - for example means NO newline (i.e. it is + forbidden to use newline here). diff --git a/doc/OLD-DOCS/defs.doc b/doc/OLD-DOCS/defs.doc new file mode 100644 index 0000000..ac0621a --- /dev/null +++ b/doc/OLD-DOCS/defs.doc @@ -0,0 +1,373 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + + DIKUMUD DEFINITIONS AND STANDARDS TO OBEY + "defs.doc" + + +PC's ~ Players +NPC's ~ Non Players (Monsters) + is used for short names +[x..y] is used to indicate min and max + + +PC's level [0..20], level [21..24] is special, not useable in gameplay. +NPC's level [0..30] + +All PC's and NPC's have following abilities : + + Strength + [3..18/100] + [0..25] + + Dexterity + [3..18] + [0..25] + + Intelligence + [3..18] + [0..25] + + Wisdom + [3..18] + [0..25] + + Constitution + [3..18] + [0..25] + + + +All PC's must select one of four classes : + + Magic User + Cleric + Thief + Warrior + + +Every PC class have a Primary ability (requisite) : + + + + + + + +When creating a new , the 's are calculated as: + + NOTE: This is when being raised from level 0 to level 1! + + The size of the dice, is determined by rolling 4 1d6 dice, + and adding the sum of the three largest dice. + The is sorted and assigned a in descending order, + depending on the class. + + == + == + == + == + + + base is set as 10 + is allways set to 100 + Set level as 1 + Set exp as 1 + Set theives abilities as basic. + + Call the "Advance Level" routines! + + +Hitpoints: + ~ Hitpoints + + 's gain in the following range when advancing a level. + [10..15] Average (12.5) + [7..13] Average (10.0) + [5..10] Average (7.5) + [3..8] Average (5.5) + + +Advancing a level ('s only): + is gained as above + "Spells to learn" is increased by + MIN(1, WIS_APPLY) for & + else + MIN(2, WIS_APPLY) for & + + follow 's up to level 20, with the + exception that NPC may have 0 in abilities. Only unusual + 's are assigned abilities. + + may be in 18/00..100 for Warriors ONLY! + + +============================= MONSTER LOOKUP ============================== + +This is general guidelines for creating monsters. This is when creating +"S"impel monsters. Detailed monsters require a great deal of care when +designing, and it is not really worth it. + +The idea is that a X level fighter is equal to about a X level monster! +This implies that the ought to decrease by one every level +(starting at '20' on level 1 - minimum is '1' from level 20+). The damage +given by a monster is also important - average weapon damage is at the +moment 1d8. + + +Level AVERAGE AVERAGE SUGGESTED SUGGESTED SUGGESTED + + + 0 [001..010] [25] 20 10 1d4+0 (2.5) + + 1 [011..022] [100] 20 9 1d5+0 (3.0) + + 2 [023..035] [200] 19 8 1d6+0 (3.5) + + 3 [036..047] [350] 18 7 1d7+0 (4.0) + + 4 [048..060] [600] 17 6 1d8+0 (4.5) + + 5 [061..072] [900] 16 5 2d4+0 (5.0) + + 6 [073..085] [1500] 15 4 1d8+1 (5.5) + + 7 [086..097] [2250] 14 4 2d4+1 (6.0) + + 8 [098..110] [3750] 13 3 2d5+1 (7.0) + + 9 [111..122] [6000] 12 3 2d5+1 (7.0) + + 10 [123..135] [9000] 11 2 2d6+1 (8.0) + + 11 [136..147] [11000] 10 2 2d6+1 (8.0) + + 12 [148..160] [13000] 9 2 2d7+1 (9.0) + + 13 [161..172] [16000] 8 2 2d7+1 (9.0) + + 14 [173..185] [18000] 7 1 2d8+1 (10.0) + + 15 [186..197] [21000] 6 1 2d8+2 (11.0) + + 16 [198..210] [24000] 5 1 2d8+2 (11.0) + + 17 [211..222] [28000] 4 1 3d6+2 (12.5) + + 18 [223..235] [30000] 3 0 3d6+2 (12.5) + + 19 [236..247] [35000] 2 0 3d6+3 (13.5) + + 20 [248..260] [40000] 1 0 3d6+4 (14.5) /* Minor Demons */ + + +Above level 20 is for NPC's only + + + 21 [261..350] [50000] 0 -1 3d7+4 (16.0) + + 22 [351..400] [60000] 0 -1 3d8+4 (17.5) + + 23 [401..450] [80000] 0 -2 3d8+4 (17.5) /* Shopkeepers, Important Guards */ + + 24 [451..500] [100000] 0 -3 3d8+4 (17.5) /* Guildmasters */ + + 25 [501..550] [130000] 0 -4 4d6+4 (18.0) + + 26 [551..600] [155000] 0 -6 4d6+4 (18.0) /* Major Demons/ Devils */ + + 27 [601..650] [200000] 0 -7 4d6+4 (18.0) /* Demi Gods */ + + 28 [651..700] [310000] 0 -8 4d6+5 (19.0) /* Lesser Gods */ + + 29 [701..900] [450000] 0 -9 4d7+5 (21.0) /* Demon Lords/Arch Devils */ + + 30 [901..1000] [600000] 0 -10 4d8+5 (23.0)/* Greater Gods */ + + + +------------------------------ GUIDELINES --------------------------------- + +MAGICAL ITEMS: +-------------- + +In DikuMud it is possible to create all kinds of Magic items - but to avoid +chaos (having 1st levels kill 20 level dragons) these rules for Magic must +be obeyed. + +It is possible to create almost any item. Items can (example) change the +, , , , , , Age, Weight, Height, XP, +etc. None of these changes are directly permanent in effetct, but may be +so indirectly - example: + + Iggy found a helmet of Increase Wisdom/Intelligence (some + modifier). + When Iggy wears this helmet - these abilities improve, when he removes + the helmet they return to their original state. Thus no direct change + has happened. BUT if Iggy practices spells (upon which INT and WIS + determines the rate & success) he will learn them much faster than + normal. This was an example of an indirect change. + + +Good ideas when making Magic Items: + +NEVER use large modifiers, exceptional items should modify at most by +3. + This includes, swords, armours, ability changes. + +Impose a penalty on the Item - for example make a helmet of wisdom may + at the same time reduce the constitution. Or maybe a ring of masochism - + when you wear it your MAX-HITPOINT increase by +200, when you remove it + they disappear again. The ring likes to remove itself from the finger. + + +============================================================================ + +MONSTER CLASSIFICATIONS: +------------------------ + +Major Demon == Balrog/etc. +Demon Lords == Orcus/etc. +Demi Gods == ?? +Lesser Gods == Heimdal/Sif/etc. +Greater Gods == Thor/Odin/etc. +Arch Devil == Asmodeus/etc. + +When creating monsters pay attention to the table above. + +Example of Monsters: +-------------------- + +============================================================================ + + +-------------------------------------------- + CHARACTER & MONSTER ARMOR: + + range from [10..-10] this is what it means : + +AC 10 = Naked person +AC 0 = Very heavily armoured person (Full plate mail at *all* body parts) +AC -10 = Armored Tank (Hopefully impossible for players) + +-------------------------------------------- + Percentwise Coverage of Armour + and allowed AC range + +Location Protects Range +-------- -------- ----- + +Body 30% [1..10] +Head 20% [1..10] +Legs 20% [1..10] +Feet 10% [1..10] +Arms 10% [1..10] +Hands 10% [1..10] + +Shield 10% [1..10] +Magic 10% [1..10] + +-------------------------------------------- + PRICE GUIDELINES + + AC BODY LEGS HEAD ARMS FEET ARMOUR +---- ---- ---- ---- ---- ---- ------ + +1 100 50 50 25 25 Cloth (Heavy) + +2 200 100 100 50 50 Soft Leather + +3 500 150 150 75 75 Studded Leather + +4 1,000 500 500 250 250 Scale Mail + +5 2,500 1,250 1,250 625 625 Chain Mail + +6 7,000 3,500 3,500 1,750 1,750 Bronze Plate Mail + +7 18,000 9,000 9,000 4,500 4,500 Plate Mail + +8 35,000 17,500 17,500 8,750 8,750 Field Plate Mail + +9 50,000 25,000 25,000 12,500 12,500 Full Plate ++10 75,000 37,500 37,500 18,750 18,750 Anti Bomb ShieldPlate + +*Hands and shields should be regarded as arms. +-------------------------------------------- + IMPORTANT NOTICE + +Rare items may only exist in minimal quantities! +Especially you should limit the occurence of +magical protection, since it is easy to carry. + +============================================================================ + +Weapons & Carrying capacity +--------------------------- + +The weight of a weapon determines the strength needed to wield the weapon, +these values should be used: + +STR Max. Weapon Weight Carrying capacity +--- ------------------ ----------------- + 0 0 0 + 1 1 3 + 2 2 3 + 3 3 10 + 4 4 25 + 5 5 55 + 6 6 80 + 7 7 90 + 8 8 100 + 9 9 100 + 10 10 115 + 11 11 115 + 12 12 140 + 13 13 140 + 14 14 170 + 15 15 170 + 16 16 195 + 17 18 220 + 18 20 255 + 18/01..50 22 280 + 18/51..75 24 305 + 18/76..90 26 330 + 18/91..99 28 380 + 18/100 30 480 + +Strength above 18/100 is only used by NPC's - not used by players. +No weapon may ever exceed 30 pounds in weight. + +There are three kind of weapons : + (P)iercing + (S)lashing (Not useable by Clerics) + (B)ludgeoning + +Backstabbing is only possible with piercing weapons. + +No weapon may ever exceed 4d6 damage (as total of magic bouns too)! + (4d6 is 14 damage as average since 4*((1+6)/2)==14) +No weapon may ever exceed 30 pounds in weight. + +No shop-produced weapon may exceed 2d8 in total damage or weigh more + than 20 pounds. + +Read notes regarding Magic before making a monster-slayer +50 +70 + with +800 to strength + + +PRIMARY BUYABLE WEAPONS : + +Name Damage Type Cost Weight Cost_pr_day +--------------- ----- ---- ---- ------ ----------- +Dagger 1d4 P 10 1 Cost/3 +Small sword 1d6 P 60 3 Cost/3 +Long sword 1d8 S 600 8 Cost/3 +Wooden Club 1d3 B 12 3 Cost/3 +War hammer 1d5 B 50 6 Cost/3 + + + +=========================================================================== +Notes: + + this is the number needed to roll on a 20-sided dice to hit + opponent equivalent of zero. A 20 is always considered + a hit, a 1 is always a miss. Example: + + Your is 14 (ei. level 7 fighter). You are fighting + an opponent with '3'. Thus to hit 0 you must + roll a 14 or greater. To hit 3 you must then roll + 11 (14-3) or greater. If you had to hit '-3' you + would have to roll 17 (14-(-3)) or greater on a 20 sided + dice. diff --git a/doc/OLD-DOCS/do_mail b/doc/OLD-DOCS/do_mail new file mode 100755 index 0000000..03518ae --- /dev/null +++ b/doc/OLD-DOCS/do_mail @@ -0,0 +1,6 @@ +mail -s "CircleMUD World Builders' Documentation (1/5)" $1 < database.doc +mail -s "CircleMUD World Builders' Documentation (2/5)" $1 < dbsup.doc +mail -s "CircleMUD World Builders' Documentation (3/5)" $1 < defs.doc +mail -s "CircleMUD World Builders' Documentation (4/5)" $1 < shop.doc +mail -s "CircleMUD World Builders' Documentation (5/5)" $1 < values.doc + diff --git a/doc/OLD-DOCS/files.doc b/doc/OLD-DOCS/files.doc new file mode 100644 index 0000000..f1d39cb --- /dev/null +++ b/doc/OLD-DOCS/files.doc @@ -0,0 +1,117 @@ +/************************************************************************** +* Copyright (C) 1993 - see 'license.doc' for complete information. * +**************************************************************************/ + + CircleMUD File Manifest + + +The main circle directory has the following subdirectories and files: + +README - Information for the new CircleMudder +automaint - shell script to perform maintenance .. see running.doc +autorun - shell script to run the MUD .. see running.doc +bin/ - directory of all the compiled programs (binaries) +doc/ - documentation +lib/ - MUD data (playerfile, world files, etc.) +log/ - system logs +src/ - source code +syslog - the current system log + +The bin/ directory contains only binaries: 'circle' (the main MUD) and +its utilities, which are described in utils.doc. + +The doc/ directory has its own README file, describing the contents of +each of the documentation files. + +The lib/ directory contains the following subdirectories: + +etc - Files which the MUD uses internally (playerfile, mail, etc.) +misc - Misc. database files meant to be changed (i.e. socials) +plrobjs - Player object hierarchy and utility scripts +text - Text files such as MOTD, news, help, etc. +world - The world hierarchy + + +The lib/etc directory contains the following files (the MUD actively maintains +these files while it is running; they should not be modified unless the game +is down): + +Board.* - Binary files with the contents of the bulletin boards +badsites - List of banned sites +hcontrol - Binary file with the state of the house control system +players - Binary file containing data on all players +plrmail - Binary file containing player mail + +The lib/misc directory contains the following files: + +bugs - Bugs reported by players with the 'bug' command +ideas - Ideas from players from 'idea' command +messages - Spell and skill damage messages +socials - Text file with text of the socials +typos - Typos reported by players with the 'typo' command +xnames - Text file of invalid names + +The lib/plrobjs contains the following files and directories: + +a-e \ +f-j \ +k-o \ Subdirectories where player objects files are stored +p-t / +u-z / +zzz/ +purgedir - Script to purge an object dir (meant for use by purgeobjs) +purgeobjs - Script to purge player objects (see utils.doc) +searchfor - Script to search for objects in obj files (see utils.doc) + +The lib/text directory contains the following files: + +background - Background story (for option 3 from main menu) +credits - Text for 'credits' command +handbook - Text for Immortal Handbook ('handbook' command) +help - Text for 'help' command with no arguments +help_table - File of all help entries for 'help' command +immlist - Text for 'immlist' command +imotd - Immortal MOTD -- seen by immortals on login +info - Text for 'info' command +motd - MOTD -- seen by mortals on login +news - Text for 'news' command +policies - Text for 'policy' command +wizlist - Text for 'wizlist' command + +The lib/world directory contains the following subdirectories: + +mob - Contains *.mob files (mobile files) +obj - Contains *.obj files (object files) +shp - Contains *.shp files (shop files) +wld - Contains *.wld files (world files) +zon - Contains *.zon files (zone files) + +Each of the 5 subdirectories in the lib/world directory also contains +two additional files -- one called 'index', which specifies which files +in that directory should be loaded when the MUD boots, and 'index.mini', +which specifies which files should be loaded if the MUD is booted with +the -m (mini-mud) option. + +The log/ directory contains several files of the form syslog.n, where n +is a small number. These are the most recent CircleMUD syslogs. + +In addition, it contains the following more permanent system logs: + +badpws - Records of bad password attempts +delete - Players who have self-deleted +dts - Players who have hit death traps +errors - MUD system errors ("SYSERR" messages) +levels - Records of all levels gained by all players +newplayers - Records of the creation of new players +rentgone - Players who have lost their items in rent +restarts - List of times at which the MUD rebooted +rip - Player deaths +usage - Mud system usage (player load & memory usage info) + + +The src directory contains all of the C and header files for the MUD, +along with a Makefile. The src/util directory contains source for +CircleMUD's utility programs. See running.doc for more information +on how to compile the MUD. See utils.doc for more information on how +to use CircleMUD's utilities. + diff --git a/doc/OLD-DOCS/hacker.doc b/doc/OLD-DOCS/hacker.doc new file mode 100644 index 0000000..c6fa2f1 --- /dev/null +++ b/doc/OLD-DOCS/hacker.doc @@ -0,0 +1,214 @@ +============================================================================= +The following documentation is excerpted from Merc 2.0's 'hacker.txt' file. +It was written by Furey of MERC Industries and is included here with his +permission. I've packaged it with Circle (very slightly changed in a couple +of places, i.e. specific filenames) because it offers good advice and insight +into the art and science of software engineering. +============================================================================= + + + +=== 'I'm running a Mud so I can learn C programming!' + +Yeah, right. + +The purpose of this document is to record some of our knowledge, experience and +philosophy. No matter what your level, we hope that this document will help +you become a better software engineer. + +Remember that engineering is work, and NO document will substitute for your +own thinking, learning and experimentation. + + + +=== How to Learn in the First Place + +(1) Play with something. +(2) Read the documentation on it. +(3) Play with it some more. +(4) Read documentation again. +(5) Play with it some more. +(6) Read documentation again. +(7) Play with it some more. +(8) Read documentation again. +(9) Get the idea? + +The idea is that your mind can accept only so much 'new data' in a single +session. Playing with something doesn't introduce very much new data, but it +does transform data in your head from the 'new' category to the 'familiar' +category. Reading documentation doesn't make anything 'familiar', but it +refills your 'new' hopper. + +Most people, if they even read documentation in the first place, never return +to it. They come to a certain minimum level of proficiency and then never +learn any more. But modern operating systems, languages, networks, and even +applications simply cannot be learned in a single session. You have to work +through the two-step learning cycle MANY times to master it. + + + +=== Basic Unix Tools + +'man' -- gives you online manual pages + +'grep' -- stands for 'global regular expression print' + +'vi' +'emacs' +'jove' -- use whatever editor floats your boat + but learn the hell out of it + you should know EVERY command in your editor + +'ctags' -- makes 'tags' for your editor + allows you to goto functions by name in any source file + +'>' +'>>' +'<' +'|' -- input and output redirection + get someone to show you, or dig it out of 'man csh' + +These are the basic day-in day-out development tools. Developing without +knowing how to use ALL of these well is like driving a car without knowing how +to change gears. + + + +=== Debugging: Theory + +Debugging is a science. You formulate a hypothesis, make predictions based on +the hypothesis, run the program and provide it experimental input, observe its +behavior, and confirm or refute the hypothesis. + +A good hypothesis is one which makes surprising predictions which then come +true; predictions that other hypotheses don't make. + +The first step in debugging is not to write bugs in the first place. This +sounds obvious, but sadly, is all too often ignored. + +If you build a program, and you get ANY errors or ANY warnings, you should fix +them before continuing. C was designed so that many buggy ways of writing code +are legal, but will draw warnings from a suitably smart compiler (such as 'gcc' +with the '-Wall' flag enabled). It takes only minutes to check your warnings +and to fix the code that generates them, but it takes hours to find bugs +otherwise. + +'Desk checking' (proof reading) is almost a lost art in 1993. Too bad. You +should desk check your code before even compiling it, and desk-check it again +periodically to keep it fresh in mind and find new errors. If you have someone +in your group whose ONLY job it is to desk-check other people's code, that +person will find and fix more bugs than everyone else combined. + +One can desk-check several hundred lines of code per hour. A top-flight +software engineer will write, roughly, 99% accurate code on the first pass, +which still means one bug per hundred lines. And you are not top flight. +So ... you will find several bugs per hour by desk checking. This is a very +rapid bug fixing technique. Compare that to all the hours you spend screwing +around with broken programs trying to find ONE bug at a time. + +The next technique beyond desk-checking is the time-honored technique of +inserting 'print' statements into the code, and then watching the logged +values. Within Circle code, you can call 'printf' or 'fprintf' to dump +interesting values at interesting times. Where and when to dump these values +is an art, which you will learn only with practice. + +If you don't already know how to redirect output in your operating system, now +is the time to learn. On Unix, type the command 'man csh', and read the part +about the '>' operator. You should also learn the difference between +'standard output' (e.g. output from 'printf') and 'error output' (e.g. output +from 'fprintf'). + +Ultimately, you cannot fix a program unless you understand how it's operating +in the first place. Powerful debugging tools will help you collect data, but +they can't interpret it, and they can't fix the underlying problems. Only you +can do that. + +When you find a bug ... your first impulse will be to change the code, kill the +manifestation of the bug, and declare it fixed. Not so fast! The bug you +observe is often just the symptom of a deeper bug. You should keep pursuing +the bug, all the way down. You should grok the bug and cherish it in fullness +before causing its discorporation. + +Also, when finding a bug, ask yourself two questions: 'what design and +programming habits led to the introduction of the bug in the first place?' +And: 'what habits would systematically prevent the introduction of bugs like +this?' + + + +=== Debugging: Tools + +When a Unix process accesses an invalid memory location, or (more rarely) +executes an illegal instruction, or (even more rarely) something else goes +wrong, the Unix operating system takes control. The process is incapable of +further execution and must be killed. Before killing the process, however, the +operating system does something for you: it opens a file named 'core' and +writes the entire data space of the process into it. + +Thus, 'dumping core' is not a cause of problems, or even an effect of problems. +It's something the operating system does to help you find fatal problems which +have rendered your process unable to continue. + +One reads a 'core' file with a debugger. The two most popular debuggers on +Unix are 'adb' and 'gdb', although occasionally one finds 'dbx'. Typically +one starts a debugger like this: 'adb bin/circle' or 'gdb bin/circle lib/core'. + +The first thing, and often the only thing, you need to do inside the debugger +is take a stack trace. In 'adb', the command for this is '$c'. In gdb, +the command is 'backtrace'. In dbx, the command is 'where'. The stack trace +will tell you what function your program was in when it crashed, and what +functions were calling it. The debugger will also list the arguments to these +functions. Interpreting these arguments, and using more advanced debugger +features, requires a fair amount of knowledge about assembly language +programming. + +If you have access to a program named 'Purify' ... learn how to use it. + + + +=== Profiling + +Here is how to profile a program: + +(1) Remove all the .o files and the 'circle' executable: + + rm src/*.o bin/circle + +(2) Edit your makefile, and change the PROFILE= line: + + PROFILE = -p + +(3) Remake circle: + + make + +(4) Run circle as usual. Shutdown the game with shutdown when you have run long + enough to get a good profiling base. If you crash the game, or kill the + process externally, you won't get profiling information. + +(5) Run the 'prof' command: + + prof bin/circle > prof.out + +(6) Read prof.out. Run 'man prof' to understand the format of the output. + +For advanced profiling, you can use 'PROFILE = -pg' in step (2), and use the +'gprof' command in step 5. The 'gprof' form of profiling gives you a report +which lists exactly how many times any function calls any other function. This +information is valuable for debugging as well as performance analysis. + +Availability of 'prof' and 'gprof' varies from system to system. Almost every +Unix system has 'prof'. Only some systems have 'gprof'. + + + +=== Books for Serious Programmers + +Out of all the thousands of books out there, three stand out: + +Kernighan and Plaugher, _The Elements of Programming Style_. + +Kernighan and Ritchie, _The C Programming Language_. + +Brooks, _The Mythical Man Month_ + diff --git a/doc/OLD-DOCS/handler.doc b/doc/OLD-DOCS/handler.doc new file mode 100644 index 0000000..22eb274 --- /dev/null +++ b/doc/OLD-DOCS/handler.doc @@ -0,0 +1,79 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + +Description of module 'handler.c'. + +*** Note: All the routines that takes something away from something assumes +that something is actually in/carried by something! + +void char_from_room(struct char_data *ch) +Removes ch from whatever room he's in. + +void char_to_room(struct char_data *ch, int room) +Places ch in room. + +void object_to_char(struct obj_data *object, struct char_data *ch) +Gives object to ch. + +void object_from_char(struct obj_data *object) +Takes object away from The character who is carrying it. + +struct obj_data *find_object_in_list(char *name, struct obj_data *list) +This procedure assumes that list points to the head of a content-list of +objects. It then tries to locate the object with a given name within that +list. If succesful, the function returns a pointer to that object; if not, +it returns a null pointer. + +struct obj_data *find_obj(char *name) +This function searches the 'global' list of objects (pointed to by +'object_list') for an object with a given name. It then returns either +a null pointer or a pointer to that object (note that in this version, +it will always return the first occurence of an object with a given name). + +struct char_data *get_char_room(char *name, int room) +Searches room for character with 'name'. Returns null or pointer to that +character. + +struct char_data *get_char(char *name) +Searches the entire world for a character. Assumes that all characters are +in a list pointed to by character_list (This might need changing). + +void object_to_room(struct obj_data *object, int room) +Puts an object in a room. + +void object_from_room(struct obj_data *object) + +void object_to_object(struct obj_data *obj, *obj_to) + +void object_from_object(struct obj_data *obj, *obj_from) + +void extract_char(struct char_data *ch) +Extracts a character completely from the world, and leaves his stuff in +the room (might be useful.. might not..). + + +**** Higher level versions of the 'find' routines. +These routines work like the above versions, with the exception that they are +supplied with a pointer to a character as well as a keyword to look for. they +then return nil if they fail to locate the object/character OR if the character +'using' the routine can't see the searched-for object/character. + + + + +struct char_data *get_char_room_vis(struct char_data *ch, char *name) + + + +struct char_data *get_char_vis(struct char_data *ch, char *name) + + + +struct obj_data *find_object_in_list_vis(struct char_data *ch, char *name, + struct obj_data *list) + + + +/*search the entire world for an object, and return a pointer */ +struct obj_data *find_obj_vis(struct char_data *ch, char *name) diff --git a/doc/OLD-DOCS/header b/doc/OLD-DOCS/header new file mode 100644 index 0000000..5e9180b --- /dev/null +++ b/doc/OLD-DOCS/header @@ -0,0 +1,13 @@ +/************************************************************************** +* Copyright (C) 1993 - see 'license.doc' for complete information. * +**************************************************************************/ + + HOW TO CONVERT YOUR IDEAS INTO REALITY + A CircleMUD Coding Manual + +Table of Contents +--------------------------------------------------------------------------- + +i. Introduction + +1. Overview and Coding Basics diff --git a/doc/OLD-DOCS/license.doc b/doc/OLD-DOCS/license.doc new file mode 100644 index 0000000..989bbf3 --- /dev/null +++ b/doc/OLD-DOCS/license.doc @@ -0,0 +1,117 @@ +This file contains the original DikuMUD license. Since CircleMUD is based +on DikuMUD, the DikuMUD license applies to CircleMUD. Note well: the use +of CircleMUD in any capacity implies that you have read, understood, and +agreed to abide by the terms and conditions set down by this license. + +Jeremy Elson +Department of Computer Science +Johns Hopkins University +Baltimore, MD 21218 USA + + +--------------------------------------------------------------------------- + + +/* ************************************************************************ +* Copyright (C) 1990, 1991 * +* All Rights Reserved * +************************************************************************* */ + + DikuMud License + + Program & Concept created by + + +Sebastian Hammer +Prss. Maries Alle 15, 1 +1908 Frb. C. +DENMARK +(email quinn@freja.diku.dk) + +Michael Seifert +Nr. Soeg. 37C, 1, doer 3 +1370 Copenhagen K. +DENMARK +(email seifert@freja.diku.dk) + +Hans Henrik St{rfeldt +Langs} 19 +3500 V{rl|se +DENMARK +(email bombman@freja.diku.dk) + +Tom Madsen +R|de Mellemvej 94B, 64 +2300 Copenhagen S. +DENMARK +(email noop@freja.diku.dk) + +Katja Nyboe +Kildeg}rdsvej 2 +2900 Hellerup +31 62 82 84 +DENMARK +(email katz@freja.diku.dk) + + +This document contains the rules by which you can use, alter or publish +parts of DikuMud. DikuMud has been created by the above five listed persons +in their spare time, at DIKU (Computer Science Instutute at Copenhagen +University). You are legally bound to follow the rules described in this +document. + +Rules: + + !! DikuMud is NOT Public Domain, shareware, careware or the like !! + + You may under no circumstances make profit on *ANY* part of DikuMud in + any possible way. You may under no circumstances charge money for + distributing any part of dikumud - this includes the usual $5 charge + for "sending the disk" or "just for the disk" etc. + By breaking these rules you violate the agreement between us and the + University, and hence will be sued. + + You may not remove any copyright notices from any of the documents or + sources given to you. + + This license must *always* be included "as is" if you copy or give + away any part of DikuMud (which is to be done as described in this + document). + + If you publish *any* part of dikumud, we as creators must appear in the + article, and the article must be clearly copyrighted subject to this + license. Before publishing you must first send us a message, by + snail-mail or e-mail, and inform us what, where and when you are + publishing (remember to include your address, name etc.) + + If you wish to setup a version of DikuMud on any computer system, you + must send us a message , by snail-mail or e-mail, and inform us where + and when you are running the game. (remember to include + your address, name etc.) + + + Any running version of DikuMud must include our names in the login + sequence. Furthermore the "credits" command shall always cointain + our name, addresses, and a notice which states we have created DikuMud. + + You are allowed to alter DikuMud, source and documentation as long as + you do not violate any of the above stated rules. + + +Regards, + + + +The DikuMud Group + + +Note: + +We hope you will enjoy DikuMud, and encourage you to send us any reports +on bugs (when you find 'it'). Remember that we are all using our spare +time to write and improve DikuMud, bugs, etc. - and changes will take their +time. We have so far put extremely many programming hours into this project. +If you make any major improvements on DikuMud we would be happy to +hear from you. As you will naturally honor the above rules, you will receive +new updates and improvements made to the game. + diff --git a/doc/OLD-DOCS/release.doc b/doc/OLD-DOCS/release.doc new file mode 100644 index 0000000..9d1af6c --- /dev/null +++ b/doc/OLD-DOCS/release.doc @@ -0,0 +1,298 @@ +CircleMUD Release History +------------------------- + +This document is basically just a a compliation of all the README files +which accompanied each release of CircleMUD. At the end is the post +to rec.games.mud.diku which originally anounced CircleMUD as a publically +available MUD source code. + +Version 2.20: November 17, 1993 +Version 2.11: September 19, 1993 +Version 2.10: September 1, 1993 +Version 2.02: Early August +Version 2.01: July 20, 1993 +Version 2.00: July 16, 1993 + +The latest version of Circle is 2.20, released on November 17, 1993. +Version 2.20 supercedes version 2.11, which was released on September 19, 1993. + + +Version 2.20 November 17, 1993 +-------------------------------- + +New features: + +o A completely new output buffering system which is far more network-efficient, + and somewhat more memory- and speed-efficient, than the original Diku system. + Definitely a major win for people with slow Net links. (Details available + by request, but this was discussed on rgmd recently.) Several other + functions (such as do_where() and do_who()) have been rewritten to take + advantage of the new system. + +o Redesigned stat screens with better readability + +o Command-line substitution via the "^" character (works identically to the + csh command) + +o Code sent by Jeff Fink (thanks Jeff!): Help now handles ambiguous cases + correctly (i.e., "help color" will give you help for color and not + colorspray) + +o vstat command to stat mobiles and object by virtual number + +o updated documentation + + +And, bug fixes of varying degrees of severity: + +o SunOS Bus errors on stealing +o +hit item bug +o Switched immort re-login bug +o Mob memory bug +o Poison/Stat bug (I think this one is native to Diku Gamma 0.0 -- the + function hit_gain was responsible for subtracting hits when a char is + poisoned, so you'd lose hits when someone statted you.) +o Stat room bug under Solaris and IRIX +o Ungroup bug +o "goto 3.guard" now works (takes you to the third guard instead of room 3) +o various other minor fixes + + +------------------------------------------------------------------------------ + + +Version 2.11 September 19, 1993 +---------------------------------- + +Changes in 2.11 (from 2.10): + +Mostly bug fixes, including: + + -- SET FILE bug + -- SIGBUS/unaligned data errors under SunOS and other OS's + -- Move limit modifier bug + -- wrist-wearing bug + -- Compilation problems with utility.c under some operating systems + +The only notable change is that the hit_limit, move_limit, and mana_limit +functions have been removed (for many reasons). From the players' point of +view, this means that a character no longer gains movement points with age. +Hit, move, and mana gain speeds are still a function of age, however. + +============================================================================ + +Version 2.10 was released on September 1, 1993. + +Changes in 2.10 (from 2.01): + +o Rewritten get/put/drop/junk/donate/give/wear/remove, so that "all" and + "all.x" work in a much wider variety of cases. Loosely based on code + sent in by Jeff Fink. + +o "Track" function based on breadth-first search + +o Configurable auto-save feature to automatically crash-save players + periodically + +o More intense error-checking in object saving system to detect problems + with file permissions + +o Many configuration options added to config.c + +o Option to make death traps automatically have dump spec-proc assigned + +o ASPELL and ACAST macros added to match the ACMD macros; spells1.c, + spells2.c, spell_parser.c, and magic.c changed to use the macros. + +o SKILL macro split into GET_SKILL and SET_SKILL macros so that error + checking can be done + +o Enhanced documentation -- a help entry now exists for every command + +o Linux compatibility, and further steps to SVR4 compatibility which will + make it into Circle eventually. (Note: you must make a change in one + line of the Makefile for Linux compatibility.) + +o All functions now prototyped before use + +Jeremy Elson +August 31, 1993 + +========================================================================= +========================================================================= + +Version 2.01 is basically the same as 2.00; most of the changes are for +making the MUD more portable, based on mail I've received after the +release of version 2.00. + +-- Problems with OPEN_MAX and SEEK_x resolved +-- Some problems with the Makefile fixed +-- Compiles much more cleanly with the -Wall option +-- A couple of minor bugs fixed +-- A few small fixes to the documentation + +July 20, 1993 + +-------------------------------------------------------------------------- + +CircleMUD was developed and tested under Ultrix 4.0; your mileage may vary. +If I have time, I'll try and port it to other machines. If you port it and +want to share your work with others, feel free to drop me a line. + +The CircleMUD 'press release' is included below, in case you haven't seen +it and want to. + +Good Luck! + +Jeremy Elson aka Rasmussen (Ras) +July 16, 1993 + +--------------------------------------------------------------------------- + + + + +Wake the kids and find the dog, because it's the FTP release of + + + C I R C L E M U D 2 . 0 + + +That's right -- CircleMUD 2.0 is done and is now available for anonymous FTP +at ftp.cs.jhu.edu! + +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 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. + +Just take a gander at some of Circle's nifty features: + + -- In-memory mobile and object prototypes and string sharing for + decreased memory usage and blazingly fast zone resets + + -- All large realloc()s have been removed and replaced by boot-time + record counting and a single malloc() for superior memory efficiency + + -- Split world/obj/mob/zon/shp files for easy addition of areas; plus, + all the world files are still in the original Diku format for + compatibility with existing areas + + -- Boot-time and run-time error checking of most data files with + diagnostic messages a lot more helpful than "segmentation fault"! + + -- Player mail system and bank + + -- Rewritten board system: boards are now stable, robust, more + intelligent, and easily expandable -- adding a new board is + as easy as adding another line to an array + + -- ANSI color codes with a fully documented programmers' interface + + -- On-line system logs + + -- Optional automatically regenerating wizlist -- a final end + to new immortals constantly asking you when they'll be added + to the immlist! + + -- "config.c" file allows you to change aspects of the game such + as playerkilling/playerthieving legality, max number of objects + rentable, and nameserver usage -- WITHOUT recompiling the + entire MUD! + + -- All text (help, mortal/immort MOTDs, etc.) is rebootable at + run-time with the "reboot" command + + -- All players are given a unique serial number -- no more messy, + time consuming str_cmp()s when you're trying to identify people! + + -- Fully integrated and robust rent/crash system -- allows normal + renting, cryo-renting, crash protection, and forced rent + (at an increased price) after an hour of idling + + -- All the standard wizard stuff you're used to: level-sensitive + invisibility, settable poofin/poofouts, wizline + + -- Advanced 'set' command which allows you to set dozens of aspects + of players -- even if they aren't logged in! "Stat" also allows + you to stat people who aren't logged in! + + -- Intelligent 'autorun' script handles different types of reboots, + organizing your system logs, and more! + + -- Circle comes with more than a dozen utilities, all fully + documented, to make maintenance a snap! + + -- And much, much more! + +Unfortunately, the original Circle had more than its fair share of Bad People +when it was alive, but it DID lead to an impressive list of security and +"asshole control" features: + + -- 3 types of sitebanning available: 'all' to refuse all connections, + 'new' to refuse new players, or 'select' to refuse new players and + all registered players who don't have a SITEOK flag. + + -- 'wizlock' allows you to close the game to all new players or all + players below a certain level. + + -- Handy 'mute' command squelches a player off of all public + communication channels + + -- Handy 'freeze' command freezes a player in his tracks: the MUD + totally ignores all commands from that player until he's thawed. + + -- Even handier DELETE flag allows you to delete players on the fly. + + -- 'set' command (mentioned above) allows you to freeze/unfreeze/ + delete/siteok/un-siteok players -- even if they aren't logged in! + + -- Bad password attempts are written to the system log and saved; + if someone tries to hack your account, you see "4 LOGIN FAILURES + SINCE LAST SUCCESSFUL LOGIN" next time you log on. + + -- Passwords don't echo to the screen; allows 3 bad PW attempts + before disconnecting you. + + -- Players aren't allowed to choose their character's name as their + password -- you'd be surprised how many do! + + -- "xnames" text file specifies a list of invalid name substrings + to prevent creation of characters with overly profane names. + + +Listen to all the rave reviews of CircleMUD 2.0! + + "How long ago was that deadline you set for yourself?" -- My Friend + + "NO ONE should be denied the power of computation." -- My Professor + + "Multi-user WHAT?" -- My Mom + +Give it a try -- what do you have to lose other than your GPA/job, friends, +and life? + +--------------------------------------------------------------------------- + +Circle's complete source code and areas are available now for anonymous FTP +at ftp.cs.jhu.edu (128.220.13.50) in the directory pub/CircleMUD. + +I welcome comments and constructive criticism about CircleMUD and would be +happy to discuss any design decisions I've made, but I'm not particularly +receptive to lunatics frothing at the mouth and thus will probably ignore +you if you flame me. + +Also, remember the odds here: one person (me) against 29,000 lines of +code (Circle), so there are bound to be some mistakes in there somewhere. + + +Good luck, and happy Mudding, + + Jeremy Elson aka Ras + diff --git a/doc/OLD-DOCS/running.doc b/doc/OLD-DOCS/running.doc new file mode 100644 index 0000000..e3f4376 --- /dev/null +++ b/doc/OLD-DOCS/running.doc @@ -0,0 +1,402 @@ +/************************************************************************** +* Copyright (C) 1993 - see 'license.doc' for complete information. * +**************************************************************************/ + + ----- Compiling, Running, and Maintaining CircleMUD ----- + + +This manual is meant to be read by implementors just getting started with +CircleMUD. This should be the first document you should read after reading +the main README file. + +It should be the first documentation you read (after the +README file in theIt describes how to get the MUD compiled, configured, and +running; use of command-line options and system logs; and required daily +maintenance. + +This i + +Table of Contents +--------------------------------------------------------------------------- + +1. Compiling Circle + 1.1. Compatibility Issues + 1.2. How-To +2. Configuring Circle +3. Running Circle + 3.1. Execution and 'autorun' + 3.2. Command-Line Options +4. System Logs + 4.1. Player Information + 4.2. Usage Information + 4.3. Errors + + +1. Compiling Circle +------------------- + +1.1. Compatibility Issues + +Ultrix 4.0 was used as CircleMUD's development platform up through v2.00; +starting with 2.10, Linux 0.99.11 was used instead. If you have Ultrix, +Linux, or another BSD-compatible system, and the gcc compiler, you should +be able to compile right out of the electronix box. If you don't have gcc, +try using cc -- on some systems such as AIX, the cc compiler is ANSI +compliant. + +The author has personally compiled CircleMUD under the following systems: + +Ultrix 4.0 +IRIX 4.0.1, 4.0.4, 4.0.5 +SunOS 4.1.1, 4.1.3 +AIX 3.2 +Linux 0.99.11 +ConvexOS V10.2 + +Others have reported successfully compiling Circle under many other +systems; if you have a BSD-compatible system, chances of getting Circle +to compile easily are pretty good. Non-BSD systems will probably have +trouble with certain functions; getting Circle to compile for the first time +on such systems may be difficult and time-consuming. SVR4 compatibility is +on the horizon; many functions have already been converted to be SVR4 +compatible, but the code has not yet been fully ported. + +The Makefile has options to compile the MUD under Linux, AIX, and IRIX. +It also has an option for SVR4 but, as mentioned above, it does not +yet completely work. The unmodified Makefile should work with many other +including those listed above. + +If you port Circle to another operating system and wish to share your work +with others, feel free to mail me your changes so that they can be included +in future releases of CircleMUD (if any). You'll be given credit, of +course. :) + + +1.2. How-To + +The /src directory contains the source code for the main MUD; /src/utils +has the source for a dozen or so MUD maintenance utilities. The makefile +is in the /src directory; type 'make' while in that directory to compile +only the Circle server, type 'make utils' to compile all the utilities, or +type 'make all' to compile everything. You can also make an individual +utility by typing 'make x', where x is the name of the utility you want to +compile. Complete documentation of the utility programs can be found in +utils.doc. + +The Makefile directs all compiled programs to the /bin directory. Although +not necessary, you may want to put Circle's /bin directory in your $PATH. + + + + +2. Configuring Circle +--------------------- + +Your first instinct will probably be to put the game up as fast as possible +to see if it works. That's fine, but there are some files you should be +aware of before you put the game up 'for real'. This is just a partial +list -- see 'files.doc' for a complete description of all the files in the +Circle distribution. + +First, you'll probably want to take a look at 'config.c' -- it has dozens +of variables you can set to configure various aspects of CircleMUD. + +The place where most of your day-to-day changes will be is in the lib/text +directory; that's where the help files, MOTD (Message Of The Day), imotd +(MOTD for immortals), and other text files are all kept. + +In particular, you should make sure to put something in your 'policy' file -- +it's better to have definite rules from the beginning than to have problems +later on when people try to bend you as far as they can. Also, you should +put tips for new immortals in the 'handbook' file (i.e., "Don't help any +mortals", "Don't kill mobiles", "Don't run through puddles", "Don't bring +glassware into the pool area", etc.) + +The area hierarchy is lib/world. 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 correct extension (i.e., the obj subdir will have +a bunch of files ending with ".obj", such as 30.obj, 31.obj, etc.) plus +two special files -- 'index' and 'index.mini'. You can control which files +are loaded by Circle simply by changing the list of files listed in 'index'. +'index.mini' controls which (smaller) set of world files should be loaded +in the debugging mode (Mini-Mud Mode, explained below.) + + + + +3. Running Circle +----------------- + +3.1. Execution and 'autorun' + +Circle should always be run from circle's "root" directory, not the /bin +directory. You can run it manually by typing 'bin/circle' (useful for +testing and debugging). For running the game "for real", it's better +to use the 'autorun' shell script provided in Circle's root directory. + +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 /log directory, and saving certain log entries to permanent files. + +Autorun can be controlled by creating files with certain names. You can +use the 'touch' command to create a file, and, of course, the 'rm' command +to remove a file. If a file called '.fastboot' exists, the Circle will reboot +immediately if it crashes or is shut down instead of waiting 40 seconds as +it normally does. A file called '.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 'pause'; +the script will go into a wait loop until 'pause' is removed. + +Although you can create these files manually, the SHUTDOWN command from +within the MUD has several command-line options which will create these +files for you. See the SHUTDOWN help entry in wizhelp.doc for more +information. + +It's not uncommon for CircleMUD to run for a week without crashing. The +game can be rebooted manually with the SHUTDOWN command, or automatically. +Once a day, at a time specified by the REBOOT_AT macro in modify.c, the +game checks for the existence of the file "reboot" in the selected data +directory. If the file exists, the game is rebooted (it terminates nicely, +with a nonzero return value). If the size of the file is nonzero, its contents +are processed by "sh" (with a system() call). If the processing returns +with a nonzero status, the file is renamed to "reboot.FAILED", and the +rebooting is called off. If it returns zero, the file is moved to +"reboot.SUCCEEDED", and the game is rebooted. + +The first character to log in to the MUD (i.e., when the playerfile is +empty) will be made the maximum level. You should fix your stats using +the RESTORE command when you first create the character. To make more +God characters, use the ADVANCE command. + + +3.2. Command-Line Options + +There are a number of command-line options which Circle will recognize. +You can use these when running Circle manually, or put them in the FLAGS +variable in your autorun script to use them all the time. + + +The syntax is: + +circle [-m] [-q] [-r] [-s] [-d ] [] + +-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). + + CircleMUD uses split world files (in the lib/world heirarchy); each + directory (i.e., wld, obj, mob, shp, and zon) has a file called 'index' + which specifies which files should be loaded at boot-time. The file + 'index.mini' specifies which parts of the world should be loaded with + the -m option. + +-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. + +-r: Restrict game to new players. Allows you to decide at run-time whether + the game is open to new players or not; -r is equivalent to typing + "wizlock 1" (see wizhelp.doc for more information). + +-s: Disable special routines. This option prevents special procedures from + being assigned. It is still supported but obsolete because Circle checks + to make sure each mob exists before assigning a spec_proc to it. + +-d: Select data directory. This is useful if you want to keep one or more + sets of game data in addition to the standard set. 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 code or worldfile without subjecting the + players to unnecessary hazards. The default data directory is 'lib'. + Any coredumps (may they never happen to you!) will take place in the + selected directory. + +port : Select the port on which the game is to wait for connections. + Default port is 4000; you can change the default in config.c and + the PORT= line of the autorun script. + + + + +4. System Logs +-------------- + +CircleMUD writes a wide variety of information to its log file (called +"syslog"). During Circle's boot sequence, the syslog 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 information about players +(i.e., when they connect, disconnect, rent, unrent, quit, die, hit death +traps, etc.) as well as status information about the game itself. The +game-related information falls generally into 2 categories: usage +information and errors. + + +4.1. 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. + +If a player ever asks you for reimbursement of equipment, money, gold, +experience points, or whatever, your gut reaction should always be to +check the logs first. + + 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 _many_ other players. + + 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. + + 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. + +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 didn't rent at all, you +just QUIT!" + +The logs also record when a player's items are dumped due to insufficient +funds (remember -- rent is calculated per day on a PER-SECOND basis! If you +rent at the rate of 100 coins per day and come back 36 hours later, you'll +be charged 150 coins!). Plus, when someone rents, it records in the logs how +much rent cost per day and how much the player had, to diffuse disputes such +as "But I had enough money!!" + +In short: the system logs are your friends. Love them. + +The 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. + + +4.2. 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 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. + +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. + +[ Note: friends not included with the CircleMUD distribution. ] + + +4.3. 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. + +A Unix utility called 'tail' is used to look at the last few lines of a +text file; it's 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. + +If Circle shuts down unexpectedly and there is no core dump in the /lib +directory, the game probably detected an internal error and killed itself. +Such shutdowns are always preceeded by entries in the system log describing +the error. + +If there's no error message at the end of the log, then there probably +IS a core dump, so you can use 'dbx', 'gdb', etc. to examine the core +dump and determine the reason for the crash. The file '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. + +Circle sometimes encouters 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 forseeing 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 log/errors. + + + + + +Day-To-Day MUD Administration +----------------------------- +Okay, so now you have your wonderful CircleMUD up and running and all is +right with the world. Right? + +Well, technically, yes. Circle requires very little day-to-day attention +in order to keep the progam 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're people! + +What I'm getting at is this: from the technical side, there are relatively +few things you have to do to keep the game running. But you can't just plop +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 'bug', 'typo', and +'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 'news', 'policy' and other text files +are up-to-date and suit the political climate on your MUD. + +If you can't or just don't want to deal with the player politics, make sure +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. + + + +Maintaining CircleMUD +--------------------- + +CircleMUD requires little technical maintenance. You should look at the +log/errors file regularly to make sure there are no recurring problems. +Also, you probably will want to 'purge' the playerfile on a regular basis +(i.e., remove "deadweight" characters). You can decide how often to purge +the playerfile -- every day if disk space is tight, or every month if it +isn't. The purgeplay utility program (included) removes deadweight players. + +You should run the 'purgeobjs' script (in the lib/plrobjs) directory after +you purge the playerfile -- it removes the object files of players who no +longer exist in the playerfile. + +The 'automaint' script in the main circle directory will automatically purge +the playerfile and player objects for you. DO NOT RUN THIS SCRIPT WHILE +THE MUD IS RUNNING! Doing so will make your life (more) difficult. + + + +Good luck with your MUD! + + + + -- Jeremy Elson + jelson@cs.jhu.edu diff --git a/doc/OLD-DOCS/shop.doc b/doc/OLD-DOCS/shop.doc new file mode 100644 index 0000000..ad2d4b0 --- /dev/null +++ b/doc/OLD-DOCS/shop.doc @@ -0,0 +1,243 @@ +/* ************************************************************************ +* Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * +************************************************************************* */ + + +NEW FORMAT: +CircleMUD v3.0 now has a new shop file format. Since the old format +is still compatible, I've kept the old documetation at the end of +this file. If you'd like to convert shop files in the old format to that +of the new format, compile and run the utility shopconv. When writing new +files, you need to tell CircleMUD that the shopfile is in the new format +by including the following line BEFORE any shops in the file: + +CircleMUD v3.0 Shop File~ + +The rest of the file is formatted as follows: + +#~ + Shop Number (Used only for display purposes) + + + + + + . + . + . + +-1 + These numbers refer to the objects the shop produces. The numbers are + virtual numbers. The list MUST end with a -1. + + + The object value is multiplied by this value when sold. This is a + floating point value. Must be >= 1.0 + + + The object value is multiplied by this value when bought. This is a + floating point value. Must be <= 1.0 + + [namelist 1] + [namelist 2] + [namelist 3] + . + . + . + [namelist n] +-1 + These lines contain the types of items that the shop will buy. The first + argument, called "type" is the type of item (see dbsup.doc). Numerical, + or english forms are valid (5 or WEAPON, 9 or ARMOR, etc) In addition, + you can provide optional keywords to give specific keywords that must + be present on the item. For further details on these expressions, see the + notes following the new file format. This list must be terminated by a -1. + +~ +~ +~ +~ +~ +~ + Price is %d +~ + Price is %d + + + When player can't afford an item, the shopkeeper tells them they + can't afford the item and then: + 0 - The shopkeeper pukes on the player. + 1 - The shopkeeper smokes his joint. + other - No action besides message above. + + + Allows you to set certain values for the shop. + WILL_START_FIGHT 1 /* Players can attack shopkeeper */ + WILL_BANK_MONEY 2 /* Shopkeeper puts money > 15000 + into the bank */ + + A brief note: Shopkeepers should be hard (if even possible) to kill. + The benefits players can receive from killing them is enough to unbalance + most non monty-haul campaigns. + + + Virtual number of the shopkeeper. + + + Designate certain alignments or classes that the shop will not + trade with. To determine this value, choose all elements on + the list below that you do not want sold to, and add their values. + + TRADE_NOGOOD 1 + TRADE_NOEVIL 2 + TRADE_NONEUTRAL 4 + TRADE_NOMAGIC_USER 8 + TRADE_NOCLERIC 16 + TRADE_NOTHIEF 32 + TRADE_NOWARRIOR 64 + + + + + . + . + . + +-1 + The virtual numbers the mobile must be in for the shop to be effective. + (So trans'ed shopkeepers can't sell in the desert). The list must be + terminated by a -1. + +