This is version 2.1.4 of COOLMUD. This file lists changes since version 2.1.3. Most of the changes in this version are internal, either for improved performance or for portability. COOLMUD is now covered under the GNU GPL. Those portions of the code not written by me (Stephen White) are covered under the copyrights of those authors. COOLMUD is not GNU software, it just has the same license. CHANGES TO THE COOL LANGUAGE ============================ o New function: find_method(str): looks for the method _str_ on the current object, and all parents of the current object. basically does the same search as is done when making a method call. Returns the object on which the method is defined, or #-1 if none. Used by the modified @list command (see below). o Tracebacks on error now give line numbers for all the pertinent methods. o Blocked methods: The declaration of a method may now include the keyword "blocked". This means that no children of that object may override that method. (Well, actually they may, but it will be ignored). The method "location" on LOCATED_OBJ was made blocked, for demonstration purposes. CHANGES TO THE STARTUP DATABASE =============================== o @list now walks up the inheritance graph when looking for a method on an object. Uses the new find_method() function. o name and id have migrated from DESCRIBED_OBJ to ROOT_OBJ. There isn't much point in having objects without names, because it just isn't fun. o The hammock (in east.cl) now has parents ROOM and CONTAINER. Due to the new multiple inheritance rules, this works perfectly. o Method "location" on LOCATED_OBJ is now declared "blocked", for no particular reason. o There is now a facility to get input to any particular method from the command line (ie., read()-like functionality). It's implemented in method "parse" on PLAYER. Method "input_to" sets the destination object and method to call when the next line of input comes in. o The @program verb, on PROGRAMMER, uses the above input_to facility along with the compile() builtin to compile new verbs and/or objects, rather than using the program() builtin. Hopefully we can eventually phase out program(), beucase it makes the implementation of a true independent network layer rather difficult. o Object ROOM now has an "exits" method, which returns the list of exits from the room. o The output of the "who" command (on SYS_OBJ) has been cleaned up a bit wrt formatting. INTERNAL CHANGES ================ o The Makfile has been reorganized to be easier to configure. Eventually all of that stuff will be hidden inside a gnu configure script. A new compile-time option "FAST" was added, that inlines many things. May actually degrade performance on newer CPU's. o The db layer has been ANSI-fied. This means the same compiler can (and will) be used for all portions of the source. The db layer now resides in the same directory as the rest of the source files (this may change back in a later version). HASHING ------- o Methods and object-variables (properties) are now in hash tables. Default sizes for these are in config.h. This means lookup time (especially for objects with lots of methods/variables) will be faster. This also means variables and methods will appear "out of order" when listed by @show, @methods, etc. A future sort() primitive might be helpful here. o Various changes were made for portability to Solaris. Most of these are hidden as "#ifdef SYSV". God, i hate string.h/strings.h. o The command-line compile mode now exits properly if the database fails to init. o Method sxearching on objects is now done in topological sort order. That is, an object is searched if and only if all the relevant children of that object to that object have been searched first. (Thanks to Greg Hudson for pointing me in the right direction). This change will only be noticeable for objects with multiple inheritance. o Blocked methods stuff. o cool.y: declarations moved to top of file to please bison. RETURN and RAISE changed to T_RETURN and T_RAISE to avoid conflicts with execution stuff. Some bugfixes wrt var_find() in "for" statements. o dbpack.c: symbols are written first, to avoid problems in loading. Modified packing of methods & vars for hashing. Also modified pack_method() for blocked methods. o dbunpack.c and dbsize.c: also changed as above. o decode.c: Modifications for finding line #'s corresponding to a given program counter location. Changes for hashing and blocked methods. Bugfix: forgot to add code to decompile MESSAGE_EXPR (oops). o dispatch.c: init() now takes a third parameter, a flag indicating whether the db should exist. If this flag is 1, and the db doesn't exist, the server exits with an error. Usually should be set to 1 when booting the server (ie., not compiling). The code that handles this is actually in dbmchunk.c (dddb_init()). Bugfix: Actually check the return value from cache_init(). o execute.c: Objects with methods being executed on them aren't kept around in memory when the method blocks. They're reloaded (probably from cache). This is much safer than the old code, which pretty much relied on not getting a cache miss while a method was executing. find_method() is now broken into find_method() and find_method_recursive(), for the actual search engine. All are now in method.c Changes for line-number display in tracebacks. Changes for new active-method object policy (keep oid, not pointer). o execute.h modified to declare actual prototypes for all opcodes in order to placate -Wmissing-prototypes (euggh). o message.c: Bugfix: obiwan error at end of lists. o method.c: See execute.c, above. o netio.c: Various fixes, some portability things for linux. o opcode.c: Changed { } to 0 for a bazillion opcode entries (god, i hate mips CC). find_method() added. o opcodes2.c: Moved count_words to util.c and explode() to list.c. o opcodes*.c: Modified for new "this" handling: pointer is transient; only objid is held in Event structure. Also modified for method and variable hashing. o strings.c: Everything modified to work, even if passed a null String. Basically returns a null String back. o DB layer is now in src directory, instead of a directory of its own. Still not sure if this was the Right Thing (tm). db/config.h moved to db_config.h, and db/mud.h moved to db_setup.h. All other files retained the same names. References to "Obj" were changed to "Object", and the actual config.h and proto.h were #included. (probably a stupid thing, since a #define would have done just as well). DB layer ansified (mostly just prototypes). dddb_init() changed to check for db's existence (if desired). This probably breaks portability to HP/UX. Yeah right, as if the rest of the source didn't already. Sigh. (Where's that gnu configure script?)