Thu Sep 9 03:05:39 CDT 1993 (bobf@metronet.com (Blackthorn)) * raised patchlevel to 0.9.18 * added -lmalloc to the EXTRALIBS Makefile line for Sequent (Cygnus) * added some typecasts to binaries.c to avoid compiler warnings(?) (from Cygnus) * added names for the F_BREAK_POINT, F_CALL_EXTRA, and F_AGGREGATE_ASSOC ops in lex.c (add_instr_name's) * added a (char *) typecast to lex.c and efuns_main.c (RS/6000 complaining) * moved clear_notify() so that notify_fail() will work from inside process_input(). * removed the ANSI-style parameter decls in main() in make_malloc.c Mon Sep 6 18:40:30 CDT 1993 (John Garnett) * raised patchlevel to 0.9.17.26 * fixed a crasher demonstrated by this code: void crash() { int x; switch (x) { case 0 : if (x) if (x) x = 0; else else x = 0; } }. This should be studied a bit more to find a more robust fix. * fixed a hanger caused by this code: mapping p,q; p=q=([]); p[q]=p; printf("%O",p); * changed push_number() to set subtype to 0. This fixed the bug demonstrated by this bit of code: void pok(int a, int b) { if(nullp(a)) write("Null A!\n"); } void create() { this_object()->pok(0); } (reported by Guile) Mon Sep 6 00:25:23 CDT 1993 (bobf@metronet.com (Blackthorn)) * raised patchlevel to 0.9.17.25 * fixed a bug in add_column() in sprintf.c where it sometimes wrote to constant strings, changed it to use an strncpy() instead, problem was noticed because of the constant that f_range() sometimes returns * rewrote the say() efun, optimized/simplified my benchmarks show it now being 3 to 10 times faster * rewrote the tell_room() efun, optimized/simplified, added 'float' as a possible 2nd arg to it in func_spec.c (the code was there to deal with it before, but it wasn't allowed), and also changed it to use %g instead of %f to print floats, like write() does my benchmarks show it now being about 2.5 times faster * added a fix posted by Oros@TMI-2 to sprintf.c * cleaned up and perhaps optimized print_svalue() in simulate.c * fixed problem of #else and #endif throwing off the line numbers for errors (Darin) * added Sequent to the list of machines that have times() in port.h (reported by Cygnus) * added patch so call_other() on an array of objects returns an array of returns from each of the calls (Oros@TMI-2) * updated the bugs file (Bugs and Ideas files are now in the src/ dir) * skipped 0.9.17.24 Wed Sep 1 15:01:09 CDT 1993 (bobf@metronet.com (Blackthorn)) * raised patchlevel to 0.9.17.23 * hopefully fixed the problem of crashes when an object destructed itself from within reset() when LAZY_RESETS are being used (John Garnett) * Changed the new message() code so a 4th argument of 0 is ignored, instead of generating an error--for backwards compatibility Mon Aug 30 00:11:41 CDT 1993 (bobf@metronet.com (Blackthorn)) * raised patchlevel to 0.9.17.22 * changed the new message() so instead of giving a bad argument 3 error when message(str, str, 0); is used, it add_message()s it, as the old message() did - for compatibility * fixed sscanf() error() msgs to have newlines at the end * removed lint.h include from bsdmalloc.c, since on all the machines I've gotten reports about, it causes errors. if the removal of this causes a problem on your system, let me know... * removed uid checks from add_worth() efun, if you don't want people calling this, you'll need a simul_efun override * fixed printf() change in 0.9.17.21--needs to go to command_giver, not current_object * reversed lvalue patch in 0.9.17.21--caused problems in other areas Sun Aug 29 22:10:41 CDT 1993 (John Garnett) * raised the patchlevel to 0.9.17.21 * changed "if (!(obj->u.map->table_size))" to "if (!(obj->u.map->count))" in sprintf.c (Grendel) * fixed make_malloc to print out bsdmalloc or smalloc if either is used (instead of printing sysmalloc regardless). * fixed lex.c to allow redefinition of macros (causes a warning rather than an error). Allows the redefinition to occur. * changed printf() efun (f_printf) to use tell_object() rather than add_message() so that INTERACTIVE_CATCH_TELL affects printf(). * added a "#define LOG_CATCHES" to options.h. Defining this causes errors messages to be printed to the log even when the error-causing statement is caught via catch(). Undefining this keeps the old behavior. Ideally this could be accomplished at runtime via an extra argument to catch() but the fix appears non-trivial. * applied Grendel's fix for an array-range as lvalue crasher. Sat Aug 28 17:26:20 CDT 1993 (bobf@metronet.com (Blackthorn)) * raised the patchlevel to 0.9.17.20 * rewrote almost all of the message() efun. should be much faster now and without all the bugs (crashers). my benchmarks show the new version is 20% to 100% faster than the old one. please test this out and let me know of any problems with your mudlib * fixed dumpallobj() to have proper hidden object checks (reported by Mobydick) * fixed socket_create() efun so it works properly when the 3rd argument (close callback name) isn't given * added Cygnus' (demon@sequent.com) match_path() efun. see the comment above it in efuns_main.c * fixed a memory leak in the each() efun (ref count wasn't being decreased on its return array) * changed notify_fail() efun to always return 0, so you can use: return notify_fail("Read what?\n");, etc * fixed comm.c so that a disable_commands() inside of process_input() will not cause a crash (Tyr) * fixed crasher in printf() that occurred when overflowing the buffer (stigb@pvv.unit.no) * added a fix for (s)printf()'s %f (float) output from hasse@solace.hsh.se - allows %.1f to print one decimal place, etc * fixed a bug in (s)printf() for mappings (with the %O format spec) (fix from Grendel) * fixed a possible crasher in the restore_object() efun where strings were being used after they had already been freed * changed file.c to not use the /usr/lib/mv_dir system() call for Sequent (reported by Cygnus) * fixed a crasher in switch-case range support (Darin) * fixed two include-related problems for HP 68xxx machines running BSD (bsdmalloc.c and port.h) * added SVR4 (but not Sequent) to the list of systems that have times() (port.h) Sat Aug 28 01:47:36 CDT 1993 (John Garnett) * raised the patchlevel to 0.9.17.19 * this release contains a few minor optimizations based on analyzing the results of the opcprof() efun. * added TRACE define to options.h that allows disabling of the trace() and traceprefix() efuns. This could make the driver run a bit faster by eliminating some bits of code in often executed sections. * optimized F_STRING case of interpret.c a bit. * tweaked sizeof() efun a bit since its called so often. * changed F_RETURN case in interpret.c to use pop_n_elems(). * fixed the lex.o rule in GNUmakefile so that cc.h builds correctly. * Fixed the swap status printing. (dj) * added CFLAGS to the make_malloc rule in GNUmakefile. Wed Jul 28 14:53:10 CDT 1993 (John Garnett) * raised the patchlevel to 0.9.17.18 * changed origin() so that it returns 1 if the current function was called by the backend (heartbeat, create, init, id, etc), 2 if the function was called by another local function, 4 if the function was called via call_other (or ->). the codes are in origin.h (this would be useful to include in the mudlib include directory). Wed Jul 28 01:13:21 CDT 1993 (John Garnett) * raised the patchlevel to 0.9.17.17 * patched binaries.c to allowing loading of binaries bigger than max_short (dj) * removed an #if 0 from binaries.c that I forgot to remove before. * added a new efun origin() which returns 0 if the caller was another object, 1 if the caller was another local function, and 2 if the function was called by the backend (heartbeat). currently, functions called as a result of verbs/actions have origin() == 0. Tue Jul 27 03:16:32 CDT 1993 (John Garnett) * raised the patchlevel to 0.9.17.16 * fixed each() to pop args at the right time. * added Wildcard's latest changes file to the ./amiga subdir (new Makefile and obj.list). * fixed a few minor "gcc -Wall" warnings in binaries.c * added an ALWAYS_SAVE_BINARIES define to options.h which lets all objects have saved binaries even if "#pragma save_binary" isn't used. Mon Jul 26 21:21:43 CDT 1993 (Darin Johnson) * raised the patchlevel to 0.9.17.15 * Space was allocated for argument types in progs, fixed this. * Fixed bug introduced in 0.9.17.14 that could crash if there were more than 1024 strings in a program. * Fixed obscure bugs with using 0 as a string case label * Increased size allowed for @MARKER..MARKER blocks * Added capability of saving a loaded LPC program as a binary file to allow subsequent loadings to be faster. See options.h (#define BINARIES) for more details. * changed rc.c to support "save binaries directory" parameter in runtime config file. Sat Jul 24 21:26:23 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.14 * changed the strstr() call in efuns_main.c to _strstr() (strsrch() efun) * changed order of dependencies for lex.o rule in the makefiles. * added Darin's patch to whashstr in hash.c to do things in one loop instead of two. * added Darin's patches to hash inside store_prog_string, which may speed up compiling (this patch based on Amylaar's driver with permission) * added Darin's patches to move the constant string evaluation from the lexer to the parser (fixes problems like !"a" + "b" evaluation to 0 instead of "0b") * added Darin's patch to swap out linenumber information as well. * changed 4%d to %4d in disassembler.c (dj) * fixed a few more bugs in disassembler.c (dj) * changed save_object() in object.c so that rename() is used instead of link(). This allows the unlink() call to be removed and avoids the possibility of the system crashing after the unlink() and before the link() (requested by Cygnus). * changed save_object() to return 0 if it fails and 1 if it does not. (used to be a 'void' function). Note that save_object() can fail in a way that causes error() to be called in which case no value will be returned (unless catch() is used) (requested by Cygnus). Sun Jul 11 16:25:09 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.13 * refixed the destruct(); shadow(); combination (ellery) * fixed bug in read_file() efun that caused driver to crash if 'start' was specified as -1. (reported by Stig S. Bakken) * added a string processing efun written by Zak@Tmi-2 (Luke Mewborn) int strsrch(string big, string little, int flag); int strsrch(string big, int littlech, int flag); strsrch searchs for the first occurance of the string `little' the string `big'. The last occurance of `little' can be found passing `-1' as the 3rd argument (which is optional). If the second argument is an integer, that character is found (a la strchr()/strrchr().) The empty string or null value cannot be searched for - `-1' will be returned if an attempt is made. The integer offset of the first (last) match, or `-1' if there was no match. This should allow many expensive usages of explode() and/or sscanf() efuns to be replaced. * added a 2nd optional int parm to each() that will reset the current position in the mapping kept track of by the each() efun. Calling each(map, 1) will reset the position in the mapping. Fri Jul 2 20:02:49 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.12 * added Darin Johnson's patches for reusing LPmud swapfile space * added #include <stdio.h> to strstr.c for NULL define. * changed cc.h rule in Makefile and GNUmakefile to depend on Makefile and GNUmakefile respectively. * replaced the break_point() efun with a break_point() eoperator. * added Dave's patches cleaning up some casts (unsigned etc). * added Dave's replacement for arch.h * fixed shadow() efun to check for destructed object as argument (reported by ellery) * Cause a cloned virtual object to try to reuse the master virtual object to save space. (assume virtual object can be reused if no references, environment, or inventory) - dj * Fix up a slight memory leak with virtual objects (the space for the original name wasn't freed). -dj * fixed a minor bug with @ENDMARKER...so it produces "" if there's an empty text block between the @ENDMARKER and the ENDMARKER (terminator). - robocoder * added @@ENDMARKER processing, which works similarly to @ENDMARKER, but produces an array of strings (1 string per line in the block). This is useful for long help() messages that should be passed onto the body pager, without having to do an explode() on a long string. - robocoder * added #elif an "else if" directive for the preprocessor - robocoder. * fixed smalloc.c for OLD_ULTRIX - Archimedes * some more constant folding of integer arithmetic operations. (dj) * Lex.c now does constant string addition. This is courtesy of * ideas from Lennart Augustsson and other CDlib driver people. (dj) * String catenation (ie, without a +) moved from compiler.y into lex.c. (for consistency - some may argue that all this stuff should be in compiler.y for aesthestics, but...) (dj) * moved HAS_MONCONTROL define from options.h to port.h * added a prototype for print_swap_stats() to lint.h Mon Jun 22 04:18:32 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.11 * moved the LIB:scm.lib before LIB:sc.lib in the Amiga makefile (fixes %f in mud's printf() for some reason). * fixed the (FLOAT + SOMETHING) case of F_ADD in interpret.c. had a misplaced "break;" (this from 0.9.17.9). Mon Jun 21 04:18:32 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.10 * changed !is_static() to is_static() in simulate.c add_action(). * changed the new lex.c case in the Makefile. * updated the Amiga Makefile for the efuns_*.c files (not tested). * saved some space in mappings by using unsigned short ints instead of ints for some structure fields. Sat Jun 19 06:48:32 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.9 * compat buster: changed the LPC #defines that began with MUDOS such as MUDOS_ARCH to be like __ARCH__. * moved *, /, +, -, and % from eoperators.c back into the interpret.c switch for performance reasons. Rewrote the F_ADD case to be faster. * added back the f_moncontrol() efun to efuns_main.c (not sure what had happened to it). * fixed the Makefile and GNUmakefile up a bit. * added whashstr() to hash.c from Amylaar's driver to speed up string hashing (uses powers of 2 size hash table). * changed stralloc.c so that the size of the shared string hash table will always be the largest power of 2 less than or equal to the specified size of the shared string hash table (as specified in the runtime config file). change stralloc.c to use whashstr(). * added __COMPILER__, __COMPILER_VERSION__, __OPTIMIZATION__ #defines for LPC objects. These give information on how MudOS was compiled. Wed Jun 16 02:51:04 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.8 * fixed a bug in the "for loop optimization" that prevented the expr3 in for (expr1; expr2; expr3) from being of the form "i++, j++" Tue Jun 15 16:33:48 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.7 * replaced quickSort() in qsort.c with the qsort from K&R 2nd edition since sort_array was crashing under Solaris under some conditions (wasn't clear the old qsort was correct). The crashes related to this appear to be corrected by this fix. Tue Jun 15 05:46:34 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.6 * added Dave Richard's (Cygnus) patches for Sequent running Dynix/3 (BSD 4.3) * added errorp(arg) efun. It returns 1 if 'arg' is an integer that has a subtype of T_ERROR. Eventually efuns will be modified to return standard error codes so that code like this will be possible: if (errorp(result = efun_call())) printf("error = %d\n", result); Will also be a perror(result) efun to return error string that goes with a particular error integer. Idea from Dave Richards. * added a #define to options.h LPC_OPTIMIZE_LOOPS that makes the optimizations in 0.9.17.5 optional (read the comments in options.h). * fixed a bug in compiler.y that caused 'for (;;)' to crash the MUD (this was introduced by optimizations added in 0.9.17.5). * added local variable 'ob' to f_shadow() (need to get rid of global 'ob'). * added check for type object in do_message() in simulate.c. if (use->item[i].type != T_OBJECT) continue; * changed commands() in array.c to handle case where s->verb is 0. * undid this change: "#if 0'd out the clear_state() from safe_apply() for now." from 0.9.17.5 * added strstr.c from BSD since some machines don't have strstr() which file.c now uses. Thu Jun 3 20:38:13 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.5 * optimized a couple of common 'for loop' and 'while loop' forms. The typical empty 'for loop' is now over twice as fast as it was before. (note: for (i = 0; i < limit; i++); is now faster than i = limit; while (i--) ; was in 0.9.17.4. * optimized while (i--); so that it only takes one LPC byte code instruction instead of three. This made it three (3) times faster (on the NeXT 68040) than it was in the past release. * added orjan@lysator.liu.se's changes to sscanf(). Fixed the bug with '*'. The number of matches wasn't correct when you used '*' to skip argumets. sscanf doesn't "eat" your `%` in the inputstring. You can put a %d, %f or %% after %s. e.g. sscanf("foo17bar", "%s%d%s", a, b, c) * fixed ed.c so that the dprint option is saved in the editor settings (Dainia@Dreamshadow). * cleaned up the #if's around startshutdownMudOS() (added SIGNAL_FUNC_TAKES_INT to port.h). * added Aragorn's port to the MIPS R3000 running EP/IX 1.4.3 (this port involved just one #ifdef in efuns.h and some Makefile tweaks (imagine that). Note: I used the symbol 'epix' for lack of something better (didn't want to use 'mips' because some DEC Ultrix machines are mips). Anyone knowing what symbol to use (if 'epix' won't work), please let me know. * fixed a bug in disassembler.c that was causing a crash when the current_object didn't have permission to write in /PROG_DUMP (found by Oros). * changed safe_apply() in array.c:objects() to apply() for now (this needs fixed). * #if 0'd out the clear_state() from safe_apply() for now. * changed dump_prog() to take an optiional 3rd arg (string) specifying the file in which to dump the information. * fixed an #if in ed.c that was causing rs6k to try to #include amiga.h Tue Jun 1 16:46:54 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.4 * separated efunctions.c into efuns_main.c, efuns_port.c, efuns_sock.c, etc. efuns_port.c is for those efuns that are massively #ifdef'd to compile on different machines. This split made to make it easier to port MudOS. * added a SOCKET_EFUNS define to options.h. If defined, the socket efunctions will be available; else, not. HAS_SOCKETS will be defined for all LPC objects if sockets are available. Again, this change made in order to make MudOS easier to port. * fixed the multiplier used in the times() variant of rusage(). * added a HAS_UALARM define to port.h and changed various *.c's to use it. * moved #include <limits.h> out of port.h. * change comments above get_dir() to correctly indicate format of returned array * fixed legal_path() so that names such as 'asdf..', etc are valid. i.e, only names that start with: . ./ .. ../ or contain . or .. between adjacent / are considered 'bad'... It used to be that legal_path() would consider a filename with a trailing ./ or ../ invalid (e.g, aasdf../bbb would be invalid). Note that a single ., or a trailing /. is ok, but trailing /.. is not. Zak@TMI-2 (Luke Mewburn <zak@rmit.edu.au>) * added Dave's patch for objects() to allow arguments objects(func, object). where object->func() acts as a filter on each of the objects to be returned by objects(). object->func() should return 1 for those objects to be kept and 0 for the ones to throw away. Mon May 31 13:00:42 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.3 * compat buster: changed the "usertime" field returned by rusage() to be named "utime" to be consistent with the naming of the "stime" field and the naming of the fields in the actual C struct. * added LPC function profiling (the usefulness of this is tied to the resolution of the cpu clock -- even though the units are microseconds, the cpu timer resolution is often much less). Added efun function_profile(object default : F_THIS_OBJECT) which returns an array of mappings: ([ "name" : name_of_the_function, "calls" : number_of_calls, "self" : cpu_time_spent_in self, /* in microseconds */ "children" : cpu_time_spent_in_children /* in microseconds */ ]) Define PROFILE_FUNCTIONS in options.h to enable this efun (read the comment in options.h about PROFILE_FUNCTIONS). * fixed rusage() to take CLK_TCK into account for those machines implementing rusage() via the times() system call. Sun May 30 01:52:55 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.2 * incorporated Wildcard@TMI-2's (John Fehr: umfehr06@ccu.umanitoba.ca) port of MudOS to the Amiga (running AmigaDOS). The port was made using the LATTICE C Compiler. For those Amiga owners without the LATTICE C compiler (or the desire to compile the driver from the source), the Amiga MudOS binaries are available from actlab.rtf.utexas.edu in /MUD/LPmud/MudOS/amiga. This port of MudOS does not fully support the socket efunctions. Any Amiga guru wanting to make them work please feel free (and send your patches to mudos-bugs@actlab.rtf.utexas.edu!). * (hopefully) fixed NELEM() macro in lex.c by adding more parentheses. * compat_buster: added the following builtin #defines for LPC objects: HAS_SHADOWS, HAS_DEBUGMALLOC, HAS_MATH, HAS_MATRIX, HAS_ED, HAS_PRINTF, HAS_PRIVS, HAS_EACH, HAS_CACHE_STATS, HAS_RUSAGE, HAS_DEBUG_LEVEL, HAS_OPCPROF. These defines are useful when writing LPC code intended to be portable regardless of with what options MudOS is compiled. Note that the define for NO_SHADOWS was removed because of HAS_SHADOWS. Fri May 28 17:47:51 CDT 1993 (John Garnett (Truilkan)) * raised the patchlevel to 0.9.17.1 * ifdef'd gethostname in lint.h for Linux. * fixed a bug in add_action() in simulate.c that was preventing shadows from adding actions to objects not already containing the function mentioned in the add_action() call (i.e. cases in which the shadower defines the function referenced by add_action() but the shadowee does not). this bug was introduced by an earlier security fix in 0.9.16.10. * changed a couple of (fread(str, size, 1, f) != 1)'s to ((fread(str, size, 1, f) != 1) || !size) in order to compensate for a bug in Linux (apparently fixed in the latest Linux patchlevel but not everyone will have the patch and the fix in MudOS was cheap). * moved the remainder of the ChangeLog into ChangeLog.2.Z since it was getting too big. * compat buster: reversed the #ifndef NO_SHADOWS in lex.c so that NO_SHADOWS is exported to all LPC objects if NO_SHADOWS is defined in options.h (rather than if NO_SHADOWS is not defined in options.h). * added a query_heart_beat() efunction that lets an object query the status of its heartbeat. query_heart_beat() returns 0 if the heartbeat is not set; otherwise, it returns the argument passed to set_heart_beat(int ticks) when the heartbeat was set.