Skip to main content

------------------------------------------------------------- (v22.2a37 promoted to v22.2b1) Sat Jul 29 21:32:05 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a37 * updated with respect to v22.1b32 * fixed miscellaneous typos and compile errors in a36 * moved most all add_action code into add_action.c * corrected db_connect in PACKAGE_DB to take only four arguments rather than five. * strings in PACKAGE_DB are now malloced/counted rather than shared [suggestion from Beek] * fixed a memory overwrite crasher in handling prototypes of inherited functions [reported by Zifnab, Loriel, Mystic, and others. thanks to Javelin@VH for a test case to reliable reproduce] * Fix error messages generated when PACKAGE_UIDS is defined and get_root_uid() or get_backbone_uid() either do not exist in the master object or do not work. Error messages were causing a crash [reported by Mystic] Fri Jul 7 21:16:16 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a36 * updated with respect to v22.1b31 * fixed process_input() so that the modified command is passed on to parse_command() rather than the original unmodified [reported by Beyond@LimaBean] * added debug code for tracing object references and finding destructed objects that never get freed. * fix receive_snoop() to handle non-nul terminated buffers passed -- use the len argument [reported by Passerby@IoT] * prepend slashes to filenames for display in ed (f, w, x commands) [reported by Avenger@AtP -- missed from v22.1b25] * implemented rfc 1184 (telnet linemode option) to better support running on port 23. the implementation is partial at present, but sufficient to serve its purpose. Tue Jul 4 19:45:03 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a35 * updated with respect to v22.1b30 * fixed escape_command() so that ! command escaping works again. * if there's no master object present when attempting a virtual object clone (shouldn't ever happen, but ...), be sure to clean up the stack before returning failure * removed recently added debug checks for destructed objects pushed onto/assigned into the stack. Sun Jul 2 19:00:55 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a34 * updated with respect to v22.1b29 * fixed lower_case() and upper_case(), both broken in a32 by locale changes * updated PACKAGE_DB support to include MySQL support and restructured to ease adding new database support [based on patches from Andrew@Nanvaent] * COMPAT BUSTER: When loading/cloning a virtual object, mudlib stats, uid/euid and privs are now properly reset with the newly assigned object name. * compile_object() in master.c will now be passed a second argument indicating whether the operation is a clone or not. * If arguments are now passed to clone_object() for create() when cloning a virtual object, the arguments will be aggregated and passed on to compile_object() in master.c as the third arg. The prototype for compile_object() is now as follows: varargs object compile_object(string filename, int cloning, mixed args...); * Don't bail out of edit_source if PACKAGE_DB is defined and it can't find msql.h, mysql.h, libmsql.a, or libmysql.a. If they can't be found, you'll have to hack the source for now. Sat Jul 1 13:18:19 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a33 * don't save command_giver on the runtime stack. use a separate stack instead. * add missing add_ref in save_command_giver() to match the free_object() in restore_command_giver() Tue Jun 20 18:41:51 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a32 * updated with respect to v22.1b28 * for the network_stats() contrib efun, return the external ports with port number rather than index position in the internal port list * restructured more code in comm.c for command handling. broke out duplicated code into new functions and generally cleaned some stuff up. This makes way for the next change: * command_giver is now reference counted and properly restored on error, etc. no more need for it to be reset to 0 in the backend. * all objects now get the class definitions from the simul_efun object if there are any, just as if they had inherited the simul_efun object. This resolves problems with class related errors when the simul_efun object is involved [reported by Pinkfish@Discworld] Sat Jun 17 12:15:08 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a31 * updated with respect to v22.1b27 * added extensive packet/volume statistic gathering to comm.c and socket_efuns.c when the network_stats() contrib efun is compiled into the driver [based on patches from Skullslayer@RoD] * Patches from Turrican@Discworld: . added an optional 3rd argument to socket_bind efun to specify the address and port to bind to (in the same format as socket_connect) . added an optional 2nd argument to socket_address efun to return the socket's local address when specified as non-zero Thu Jun 15 17:11:07 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a30 * NUL terminate user input buffer before passing it to handle_snoop(). [reported by Passerby@IoT] * correct handling of cr/lf when processing commands [reported by Loriel@Lima Bean] Mon Jun 12 09:06:09 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a29 * updated with respect to v22.1b26 * handle backspace in user input because some clients send everything and don't filter out local edits [reported by Requiem@SG] * handle both \r and \n for command delimiters in user input [reported by Requiem@SG] * respect NO_IP_DEMON option and -N driver command line option in the new address server reconnection code [reported by Skullslayer@RoD] * expanded the array returned from the localtime() efun to include LT_ISDST. This is supported on most platforms. For those that it is not, the value will be -1. * the third argument to tell_room() can now be an object (from Ideas) * when COMPAT_32 is defined, closurep becomes an alias for functionp [reported by Passerby@IoT] * made PACKAGE_PARSER compile with NO_ENVIRONMENT again * added an error handler to (s)printf to clean up its state when an error occurs (usually only caused by the object_name master apply) * edit_source will load options.h/local_options for -configure, but will not yet check the validity of these files. this is done so that proper configuration can be done for PACKAGE_DB * when NO_ANSI and STRIP_BEFORE_PROCESS_INPUT are both defined, escape characters are stripped as they're copied into the user buffer, saving alot of unnecessary work stripping them out later. * removed dead telnet_neg() function from comm.c * check for tzset() and the need to prototype it in configure phase Mon Jun 5 13:16:25 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a28 * updated with respect to v22.1b25 * rewrote user command handling in comm.c: . several buffer over-run fixes . flush existing buffer before flushing a new OOB buffer . ignore other than IAC IAC and IAC SE while in an IAC SB . remove the space/backspace empty command hack . some optimizations, less string scanning/copying than before . fixed a memory leak when there are more than two lines to be processed in PORT_ASCII and the object is destructed . user input that exceeds the input buffer is now completely thrown away. * additional cleanups to parser package from brett@stummies.org * check the reference time of the object before calling reset to determine if the object needs cleanup, the same way it's checked for swapping. * line number information is now stored as an int rather than a short if USE_32BIT_ADDRESSES is defined. * COMPAT_BUSTER: when COMPAT_32 is defined with PACKAGE_UIDS, the uid assigned to a new object is the euid of the current object rather than the uid of the current object. * fixed #warn to be properly recognized [fix from Skullslayer@RoD] * fix a parser crasher in interrogate_object() when the object has both PI_SETUP and PI_REFRESH flags [reported by Dvarsk@Nightmare] Wed May 24 12:01:34 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2a27 * updated with respect to v22.1b24 * fixed (s)printf() to be re-entrant. This allows for the removal of the master()->object_name() restriction which would cause an infinite loop and crash the driver anyway. * contrib efun replaceable() does the checks that replace_program() actually does now, and also adds a check for APPLY___INIT in addition to APPLY_CREATE. * added a query_replaced_program() contrib efun to return the name of the program that was replaced by replace_program(). Returns 0 if replace_program() has not been called on the object. * save_object() will save the name of the program that was replaced by replace_program() if it has been replaced rather than the program it was replaced with. * fixed crasher when number of locals to pop in the compiler was 0. * added GET_CHAR_IS_BUFFERED to options.h. Not defined by default, but when it is defined, get_char() will be buffered. See the comment in options.h for more information. * an attempt will now be made once every 15 minutes to reconnect to the address server if the connection has been lost (or not made at start- up to begin with). * if THIS_PLAYER_IN_CALL_OUT is defined, reclaim_objects() will only zero the saved command_giver if that object has been destructed. Thu Nov 12 12:53:35 EST 1998 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a26 * updated with respect to v22.1b22 * added Skullslayer@RoD's patch for #warn and #error Wed Mar 4 04:57:16 EST 1998 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a25 * updated with respect to v22.1b21 * paranoid debugging check added in compiler.c * fixed typo in string_copy() call in add_slash() * Fixes from Belgarat: . update patch_in() to take into account the v22.2a17 switch changes . remove obsolete code in DEBUG_MALLOC_EXTENSIONS (privs_file_fname no longer used) . fixed typo that caused parse_refresh() to be ignored * SERVER_IP stuff moved to the runtime config file. SERVER_IP defines in local_options files will still work. [change from Gorta] * '&' is now a synonym for 'ref' when COMPAT_32 is defined * fixed crasher when ref was used in function calls inside function arguments, e.g. func(foo, bar(ref x), ref x) Thu Feb 26 00:34:42 EST 1998 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a24 * more EOF fixes in lex.c [reported by Lathander] * fixes from Turrican@DW . call set_non_blocking() on all new accepted sockets since there evidentally exists OSs that don't do this . NUM_EXTERNAL_CMDS is now in options.h . removed name field from lpc_socket_t (was unused, and the lookup didn't use addr_server, ack) . external_start can now take an array of string arguments as the second arg * call_stack(0) now correctly returns "" and not "/"; actual fix is in add_slash() so this may fix other instances of this behavior as well [reported by Donky] Mon Nov 24 14:58:27 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a23 * added leading / to filename in function return type warning message [reported by Aragorn] * fixed crasher in explode() when result exceeds the max array size [reported by Aragorn] * fixed EOF handling in lex.c * Errors no longer turn off the heartbeat (and send the heartbeat message) if MUDLIB_ERROR_HANDLER is enabled. * program_info() now returns a mapping Wed Nov 12 21:42:54 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a22 * recompute runtime_index instead of storing it in the apply_low cache * fixed all uses of is*() functions on signed chars with the high bit set * fixed typo in apply_low() cache check * reference programs in the apply_low() cache to avoid being confused by dangled pointers. fixes crasher reported by Aragorn, Jihad. See discussion in interpret.c for additional details. Wed Nov 12 13:17:52 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a21 * fixed BINARIES to work with the new switch() format * updated loop generation for LPC->C * fixed a typo in grammar.y.pre (patch was backwards last patchlevel) * made the "Multiple access modifiers" error message a bit less ambiguous Tue Nov 11 18:34:44 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a20 * three typo fixes from Aragorn (edit_source.c, grammar.y.pre, packages/contrib.c) * one from Symmetry (grammar.y.pre) Fri Nov 7 12:35:42 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a19 * updated with respect to v22.1b19 * reduced call_other cache overhead by a factor of two. * fixed compilation with PRIVS on [reported by Jihad] and PACKAGE_UIDS/PACKAGE_MUDLIB_STATS defines [reported by Leto] * fixed the disassembler to know F_SWITCH addresses are relative now * don't warn about m[-1] if m is type mapping * fixed crasher in map_mapping() * fixed non-existent master applies * call pop_value() on the first_for_expr before parsing the body of the loop, so any warnings generated have the correct line number [reported by Aragorn] * from Symmetry: . fixed unused warnings for things like {int x = 1; } { int y; } . fixed checks for multiple access modifiers . fixed bug in switch ranges Tue Nov 4 16:53:54 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a18 * updated with respect to v22.1b17 * cp() now also errors (like mv()) if the src and dest files are the same. Previously, it just truncated the file. [suggested by Zod@Delirium] * -> syntax now uses a call_other() sefun, if one exists. Type checking for it was also improved somewhat. * master applies are now cached the same way simul_efuns are. applies.h is now autogenerated from 'applies'. Heartbeats also use the same calling mechanism now. * global 's/){/) {/' on the source code (sorry Sym :-)) * Removed strstr.c; OS's definition is undoubtably better in most cases * Correct line number info is now generated for initializers (this is actually almost a side effect of one of Symmetry's changes) * Changes from Symmetry: . varargs int global = 2; is an error now . More restrictive, but sensible type order: <*|> Earlier one could also do basic_type ref array etc. . ref cannot be used in global vars, casting (also an earlier crasher), function declaration, local declarations . Can have at most 64 classes now, earlier it was 32 but one would also be able to crash it at 32 I believe . Make sure that variables/functions have appropriate types after inheriting classes . Better error message if a previous func definition does not match an about to be defined function . Fixed some unused local var warnings which were erroneously (not) generated e.g. in { int x; } { int y; write(y); } Also fixed the order of such warnings in the case of { int x,y; } . fixed a crasher/hanger in scratchpad for having a scratch_copy_string when the scratchpad is completely filled (reported by Curuntar@Lima Bean) . Actually free the scratchpad immediately after new(class foo, x:1, y:2) instead of waiting until the end of compilation . Give error message for new(class foo, x:1, x:2) . Global modifiers now work a little differently. There is the notion of access modifiers (private, public, protected/static). Other modifiers are (varargs, nomask, nosave/static). The modifier now affects everything until the next such modifier: private: varargs int foo(mixed a, mixed b){ } means that foo is private varargs. It is an error to have two different access modifiers (such as public private) for any function, global var or inheritance. This is the case only if SENSIBLE_MODIFIERS is defined, since old libs often use private static etc. Also fixed the check of 'public private:'. Earlier it wasn't causing the warning that would have been given. . Significantly reduced program size, especially function tables. A prototypical example of the savings for /std/race/human on Lima, which normally has 533 functions, 526 of which is inherited: The function table size is about 3k normally in prev versions, 2k if COMPRESS_FUNCTION_TABLES is used, and about 1k currently (even though one actually saves 601 functions currently, which amounts to 140 bytes extra, which could be removed but at a cost in speed in local calls). This example is typical of most mud programs which inherit many functions but only add a few themselves. The 1st call_other and local_calls should be better than previously having defined COMP_FUNC_TABLES, but worse than previously not defining it. The program header has also been cut down 8 bytes. If BINARIES is not defined, one saves an additional 4 bytes per non-inherited function. program_info(object ob|void) is a good way to find out about program sizes. . The order of name resolution for multiple inheritance is as follows: inherited prototypes < non-inherited prototypes < inherited functions < non-inherited function (can only be one) Within each class sequential order is used for resolution (later inh prototypes win over earlier for e.g.). The use of prototypes is dual: (1) As an abstract method (see java). You can call prototypes and only let inheriting programs define the actual functions. (2) A typesetter. At this moment this is semi-strict. A warning is produced for return type not being compatible. Argument types are not checked however. While it is not crucial in principle, programmers are encouraged not to be too lax about types. In the future (possibly far), it may be that meaningful compile-time types are the only way to progress. . If BINARIES is defined, only save string switch info if PRAGMA_SAVE_BINARY is true . LPC->C RUNTIME_LOADING support for alpha Tue Oct 7 01:39:30 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a17 * updated with respect to v22.1b16 * Don't generate unused argument warnings for variables in prototypes [reported by Jihad] * Generate a warning for global variables with the same name as another global variable (unfortunately, historically this hasn't been illegal) * improved RUNTIME_LOADING support on Linux from Alaron@RetroMUD * fixed crasher/garbage error for replace_program(non_string) * -Wmissing-declarations added to the develop compile options; lots of local procedures declared static. * compat/simuls/apply.c extended to have all the functionality of 3.2's apply(). * added a warning for declaring a global variable with the same name as another global variable * fixed the disassembler not to crash on out of range simul_efuns and zero opcodes * added USE_32BIT_ADDRESSING which allows up to 4GB of bytecode as long as all branches are less than 64k. When LPC->C is defined, this is always on. * switch() offsets are now all relative * deep_inventory() and living() default to this_object() * added F_SHORT_INT opcode for two byte integer constants * optimized map_mapping() to not copy ref 1 mappings Sun Oct 5 12:26:39 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a16 * fixed crashes in attempting to use ::func() to call a private function [reported by Random et al, fix from Cloud] * if gcc is being used, try using __USE_FIXED_PROTOTYPES__ to have the gcc header files define prototypes for functions that are missing (hopefully this can get rid of more of lint.h especially on SunOS. Anyone care to test on SunOS?) * fixed typo in Makefiles ($(DRIVER) -> $(DRIVER_BIN)) * added reclaim_call_outs() prototype * added debug() accounting code for COMPRESS_FUNCTION_TABLES; uses "comp_func_tab" as a label * added "LPC" and "LPC_line" debug() labels; the former uses line number information to print out the file and line of code as it executes. The latter pulls the line itself out of the source file and prints it too. * fixed crasher in safe_apply() due to args left on stack when an error is caught. (This is the LIMA "crash when updating SECURE_D or master object and getting a warning" bug) * The starting debug_level can now be set from the command line; use -d followed by the name of the flag that set_debug_level() uses. e.g. "-dLPC -dLPC_line -dsockets" Sat Oct 4 23:29:51 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a15 * updated with respect to v22.1b15 * added implementation for filter(string, ...) Sat Oct 4 23:29:51 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * (v22.2a14 release bungled; number skipped) Thu Sep 25 00:22:45 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a13 * updated with respect to v22.1b14 * improved warnings for code with no side effects * changed optimizations for casted string constants to obey their new type (just for consistency) * resolve() can now take a function pointer as the second arg Wed Sep 10 01:14:10 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a12 * added a Perl script compat/fixstatic that does a pretty good job of converting static to nomask/protected Fri Sep 5 01:01:54 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a11 * fixed ASCII external ports * implemented MUD mode external ports (use "MUD" in the config file; the mixed value gets passed to process_input) * Parsing package changes: . parse_sentence has an optional 3rd and 4th arg. . The 3rd arg an array of objects to use in the parse instead of the inventory of the environment of the user. Nested arrays indicate containment, i.e. ({ ob1, ({ object inside ob1 }), ob2, ob3, ({ first ob in ob3, second ob in ob3 }), ... }) . The 4th argument is a mapping of string -> object which can be used to supply nicknames and similar things. For this parse, the 'object' acts as if 'string' were returned by pc_id_list(). Entries that do not correspond to objects involved in the current parse are ignored. . fixed crashes in calling parse_refresh() from within a parser callback. This is now the correct way to say "I'm returning this answer, but ask again next time too" Wed Sep 3 13:30:07 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a10 * updated with respect to v22.1b12 * added missing 'return ret' in dump_socket_status() compat simul * added parser packages fixes from Belgarat: . new error: ERR_MANY_PATHS returned when the number of possibilities needed to figure out the meaning of a sentence exceeds a certain number (i.e. figuring out certain highly ambiguous sentences isn't worth the CPU) . PARSE_DEBUG can be used to get parser debugging without compiling with DEBUG on . evil new :c modifier that means just choose the first one you find, for MUDs that want to make a mistake they will regret for the rest of their lives, and be hated by their players [nah, the maintainer would _never_ insert personal opinions into the ChangeLog] . "finally, two-object rules are examined more thoroughly and some strange parse errors are eliminated. Changed semantic for applies: direct_ and indirect_ applies can be called with 0s as the object-type arguments. However it's now guaranteed that they will be called with filled object arguments at least once during the processing of a rule. This allows objects to do explicit checks. The direct_ and indirect_ applies should work as usual when they receive 0 as object argument - they simply should return if the object can or can not participate in the rule. When the arguments are filled, the direct_/indirect_ applies can perform thorough checks and return errors." Sat Aug 30 19:23:35 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a9 * updated with respect to v22.1b11 * fixed typo in '\\' handling in #defines; also added overflow check * removed unused local in interpret.c * added a #breakpoint preprocessor directive which calls lex_breakpoint(), which does nothing. Useful for setting debugger breakpoints that stop at a particular point in LPC compilation Wed Jul 23 18:30:27 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a8 * added lex.c fixes from Burty: . Handle '\\' correctly in defines . preserve whitespace when expanding defines . added quote checks in expand_all_defines() Thu May 15 14:14:42 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a7 * reformatted the trace information with MUDLIB_ERROR_HANDLER off; should be a bit easier to read now. Wed Apr 16 07:54:45 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a6 * updated with respect to v22.1b8 * object_present() now depends on #ifdef F_PRESENT instead of NO_ENVIRONMENT so it disappears in the !NO_ENVIRONMENT && !F_PRESENT case too. [idea from Jihad] * name change: the file "Install" is now "INSTALL" to make it slightly more visible * fixed file.h to check file_incl.h for S_IS* first [fix from Leto] * fixed the multiple class inherit code to work [fix from Wodan@Discworld] Sun Apr 13 23:59:02 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a5 * updated with respect to v22.1b7 * fixed compilation with DEBUGMALLOC off * (: efun::foo :) is now a valid efun pointer (assuming master()::valid_override() doesn't complain) Sat Apr 12 15:06:30 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a4 * updated with respect to v22.1b6 * reclaim_objects() now cleans destructed this_player's and objects out of the call_out() list * commenting out input_to() or get_char() in func_spec.c now removes all related code and variables Sun Apr 6 18:00:43 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a3 * updated with respect to v22.1b5 * classes can now be inherited multiple times, as long as the definitions are consistent. * fixed macro expansion to expand all arguments to macros immediately. in particular, the ANSI stringize hack: #define S(x) #x #define STRINGIZE(x) S(x) now works. E.g. after #define FOO bar, STRINGIZE(FOO) gives "bar" and not "FOO" Wed Apr 2 15:11:10 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a2 * updated with respect to v22.1b4 * specifying both left and center justification in sprintf() now pushes odd-length strings to the left instead of the right, e.g. sprintf("%|8s", "foo") == " foo " sprintf("%|-8s", "foo") == " foo " * fixed crasher in calling socket_status() for a socket owned by a destructed object [reported by Jihad] Tue Apr 1 13:59:43 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a1 * added a slightly improved version of Tim's socket_status() efun. Usage: socket_status(int fd) returns an array with: . ret[0] = (int) fd . ret[1] = (string) state . ret[2] = (string) mode . ret[3] = (string) local address . ret[4] = (string) remote address . ret[5] = (object) owner socket_status() returns an array of arrays; one for each socket. * COMPAT_BUSTER: dump_socket_status() is gone; see compat/simuls for a replacement [written using socket_status] * socket status information is now cleared when the socket is closed * fixed a bug that caused the close callback not to be called for sockets that went through the CLOSING state ---------------------------------------------------------------------------- (v22.1a17 promoted to v22.1b1) Wed Jan 29 19:15:44 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a17 * updated with respect to v22b27 * fixed origin() to not return "call_out" for ORIGIN_INTERNAL [reported by Jihad] * added Marius' patch to make the parsing package work with NO_ENVIRONMENT. Requires the following new master applies: . parse_get_first_inventory(object ob) { must behave like first_inventory(ob) } . parse_get_next_inventory(object parent, object current) { must behave like next_inventory(current); parent == environment(current) in case you need it } . parse_get_environment(object ob) { must behave like environment(ob) } [I'm not in love with this interface, but it will do for now] * fixed a number of warnings Sat Jan 25 18:14:00 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a16 * wrapped debug.c in #ifdef DEBUG_MACRO * fixed crasher in file operations very early in the boot process (before the master object loads); evidentally some libs actually do this [both reported by Aragorn] Thu Jan 9 20:20:40 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a15 * updated with respect to v22b26 * added Raistlin@IE's patches to make the Win32 build procedure much cleaner and not depend on so many GNU utilities; also did a wonderful job of cleaning up the OS specific Win32 code. Fixes a number of bugs, as well. [ also, I can't test these, since I still don't have a Win32 compiler, so I'd appreciate it if someone would let me know if I messed something up ] * fixed crasher in explode("foofoo", "foo") with SANE_EXPLODE_STRING on and REVERSIBLE_EXPLODE_STRING off * enhanced DEBUG_MACRO a bit; things are now in terms of identifiers instead of impossible to remember numbers. To add a new one, add the define to debug.h and the entry near the top of debug.c Then do: debug(mylevel, (...)) new efuns: . set_debug_level("mylevel") . clear_debug_level("mylevel") . debug_levels() [returns a mapping showing which messages are enabled] * A few changes to call_out: . 0 delay call_outs are legal . call_outs to the same time are in the order they are set up, not in reverse order . call_outs() from w/in call_outs() are relative to the time the call_out was scheduled to go off, not the actual time; this is because: . the current time is slowly advanced as call_outs are executed until the current time reaches the real time, instead of taking a huge leap forward (in the event that the MUD is busy enough that it is getting behind) Mon Dec 30 04:08:08 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a14 * fixed compilation with UIDS enabled [reported by Leto] * added support for: . allocate(int n, mixed v): allocates an array of n elements. The i-th element is set to evaluate(v, i) [i is in the range 0..n-1] . allocate_mapping(array keys, mixed v): - if v is an array, the returned array has keys 'keys' and values 'v' (like 3.2.x's mkmapping) - if it is a function, the the mapping has keys 'keys' and values evaluate(v, key) - otherwise, each key has the value 'v' Mon Dec 9 13:27:42 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a13 * updated with respect to v22b25 * fixed a bug introduced recently which caused random() to always return zero when drand48() was being used [reported by Leto] * changed restore_object() to ignore ^M's at the end of lines in save files * added leading / to get_save_file_name() argument [reported by Leto] * fixed ARCH define for Linux/alpha * fixed some implicitly defined functions which cause warnings on the alpha * fixed crasher/wild pointer write in code like: foreach (string s, ref r in m) { map_delete(m, s); r = 0; } Sun Dec 8 23:50:32 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a12 * fixed a bug that would cause implicitly defined functions (ones with no prototype in scope allowed by strict types being off) to become invisible when inherited [reported and tracked by Aragorn; also reported to affect NM muds on alpha drivers] Fri Nov 8 12:03:53 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a11 * updated with respect to v22b24 * changed function pointers whose owners are destructed to be ignored by call_out_list() and to not error when they fire. Changed so that "foo" and (: foo :) have the same/similar behavior. This isn't strictly an equivalent case, since (theoretically) the function could be owned by a different object than the one that did the call_out(), but that is probably restricted to code doing call_out()s on behalf of other objects anyway, and the runtime error is more annoying than useful. [Suggested by Mordred@RoD] * to_int() now returns undefined if no valid characters were converted. * leading slash added to in_edit() [reported by Mystic] * call srand48() if using drand48() to make random numbers [fix from Turrican@DW] * fixed compilation with NO_ADD_ACTION off or OLD_ED on, or NO_BUFFER_TYPE on * fixed the order of .o files for RUNTIME_LOADING * fixed switch() when two cases differ by more than 2^31 * better local_options error message Sat Nov 2 18:00:04 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a10 * use -m486 for pentium too * added /'s in non mudlib error_handler traces * fixed compilation with SUPPRESS_ARGUMENT_WARNINGS off * receive() can now take a buffer as its argument (useful for PORT_BINARY connections) * fixed PROFILE_FUNCTIONS not to miss calls which miss the apply_low cache * fixed the driver not to loop if more than one -D option is passed on the command line * the debug.log file is no longer opened and closed every time it needs to be written to; it is held open instead * made the DEBUGMALLOC hash a bit more efficient * fixed a bug that caused terminal_colour() not to strip spaces of the starts of all lines, instead of just continuations of wrapped lines * parser callbacks went back to being ORIGIN_DRIVER, since they are restricted to the 'can_', 'do_' and 'indirect_' namespaces * various fixes to compilation with uids enabled * add to the errors field of mudlib stats, even if a mudlib error handler exists * added parser support for 'a', 'any', 'my' Tue Oct 29 20:41:26 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a9 * updated with respect to v22b21 * fixed possible crashers in code like 'call_out(something, 1, ref x)' * fixed wild pointer into stack in code like: mixed global; void foo(mixed args...) { global = args; } void create() { int x; foo(ref x); } void inc(int ref x) { x++; } void increment_random_location_on_stack() { inc(global...); } * fixed the 'multiple access modifiers' warning not to consider nomask and nosave to be access modifiers * disabled the multiple access modifier error message with SENSIBLE_MODIFIERS off * fix for compiling with COMPRESS_FUNCTION_TABLES off from Mystic * fixed compilation with FD6 code disabled * fixed various crashers in the unused locals warnings * various changes to func_spec.c so that built in efuns can be disabled or renamed (e.g. remove or rename clone_object(), etc) [idea from Mystic] * added support for foreach (ref x in array), foreach (x, ref y in mapping) * better error message for indexing an illegal type using a range * enabled the 'public' keyword with SENSIBLE_MODIFIERS on; it was accidentally disabled. Also fixed the options.h entry to be clearer * added a SUPPRESS_ARGUMENT_WARNINGS option, to cut down on the number of warnings generated by code which existed before omitting the argument name was legal * fixed terminal_colour() to treat multiple spaces as one space when wrapping [reported by Jihad] * fix for errors writing to flushing sockets Mon Oct 28 17:14:29 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a8 * COMPAT_BUSTER: ORIGIN_CALL_OUT is now ORIGIN_INTERNAL; in addition most driver callbacks which do not use hard coded function names also use ORIGIN_INTERNAL (add_action, socket callbacks, etc). The practical fallout of this is that such routines may be static, but *not* private. * Use fd #6 instead of fd #3, since Solaris uses fd #3 while starting the program [reported by Aragorn] * fixed crasher in the parsing package generating the object list [fix from Aragorn] * It is now legal to use a class member of something of type mixed, as long as it is unambigous (e.g. foo->x is ok as long as only one class in scope has a member named 'x', or if 'x' is in the same position in all classes in scope) * Unused local variables now generate warnings * function arguments no longer need to have names (and not naming them inhibits 'unused' warnings) * more than one access specifier (e.g. 'public private protected') generates a warning * If SENSIBLE_MODIFIERS is defined, then: (1) 'static' no longer exists, and is replaced by 'nosave' and 'protected' (2) 'public' no longer means what it used to; it now means the default visibility * COMPAT_BUSTER: modifiers from a ':' declaration only affect declarations which have no modifiers of their own. I.e. 'private: nomask x;' no longer declares x to be private * if VIRTUAL_RESERVED_WORD is defined, then 'virtual' is a reserved word. Doesn't do anything, though. * if REF_RESERVED_WORD is defined, the 'ref' can be used to declare arguments to functions to be by reference instead of by value. example: int foo(int ref i) { i++; } void create() { int y = 1; foo(ref y); write(y); } prints '2'. Note that ref is required both in the declaration and the call. * fixed a bug that would cause compile errors when indexing something of type 'mixed' * added an 'efun_defined' pseudo function to the preprocessor. It works just like 'defined', except that it looks up efuns. Example: #if !efun_defined(snoop) write("snoop efun not available.\n"); #endif Mon Oct 21 17:48:12 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a7 * updated with respect to v22b20 * added Burty@Nanvaent's fixes for stringizing and macro expansion * added support for array &= and |= [idea from Avenger@CoreDump] * added the object name to the "Saving successful match" parser debugging message [idea from Aragorn] * added Leto's SERVER_IP patch * abort compilation after getting 5 errors, since we don't print any more anyway, and the leaks this was supposed to prevent were fixed years ago * MudOS now checks if file descriptor #3 is a valid socket when it starts up; if it is, it is used as a login port. * added a 'portbind' program: syntax: portbind [-p port#] [-d drivername] [-u uid] [-g gid] [args ...] All it does it bind the specified port, then execv() the driver, passing the bound port as file descriptor #3 (see above). drivername defaults to ./driver, and port# defaults to 23. if uid or gid is specified, setuid() and setgid() are called before exec'ing the driver. This means one can bind the telnet port by making portbind setuid, and using: portbind -u -g config.mud to run the driver Wed Oct 9 15:26:37 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a6 * updated with respect to v22b19 * fixed compilation with NO_ADD_ACTION off, PRIVS on, or PROFILE_FUNCTIONS on [re: the 'ob' global recently removed; reported by Aragorn, Jihad, Avenger, etc] * only do promotions (int)<->(float) on assignment, not op=; in the second case the conversion will be done by the efun (if legal) so there is no need. Mon Oct 7 16:43:45 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a5 * hidden checks are now compiled out if set_hide() is disabled in func_spec.c [idea from Avenger@CD] * buffer code is compiled out if NO_BUFFER_TYPE is defined; also fixed a few old references to DISABLE_BUFFER_TYPE. [idea from Avenger@CD] Also, a binary port in the config file will cause a sensible error message, and attempting to create a binary socket will return EEMODENOTSUPP. * removed the 'ob' global in efuns_main.c and related hacks with respect to object_visible(); also fixes a bug in the return value of environment() when it is hidden (and probably other bugs elsewhere too) [reported by Jihad] * fixed crasher in using the name of a file that doesn't exist as the object in an efun callback (e.g. filter(({}), "foo", "bar")) * fixed a couple compile problems and a crasher in PACKAGE_MUDLIB_STATS [reported by Avenger@CD] Thu Oct 3 18:16:53 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a4 * updated with respect to v22b17 * need to include "master.h" in the uid package now [fix from Leto], mas well as md.c, and master.c needs comm.h when tracing is enabled * fixed Makefiles on non-GNUmake systems to include the two new files introduced last pl * fixed crasher in the handling of refreshing the master object; also the literals are cached but are *not* affected by parse_refresh(). The reasoning is that if they change, it would cause all hell to break loose with existing rules. So parse_refresh() only needs to be called when the return value of parse_command_users() changes. Tue Oct 1 19:14:42 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a3 * updated with respect to v22b16 * fixed various crashers in the new snoop code [reported by Jihad] * Many thanks to DrFeelgood for helping clean up header file dependencies, and pointing out typos in options.h * Warning for using both a 'port number : ' line and an 'external_port_1 : ' line * moved master object and function pointer handling to their own files Mon Sep 30 18:56:54 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22.1a2 * updated with respect to v22b15 * #'foo is now the same as (: foo :) when COMPAT_32 is defined [suggested by Bubbs] * added NO_SNOOP option * The requirement that a snooper must be interactive has been lifted (though this isn't particularly useful unless RECIEVE_SNOOP is also defined) [suggested by Larnen] Tue Jun 4 00:57:30 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22.1a1 * COMPAT_BUSTER: #include <...> now no longer searches based on relative paths; #include "..." still does. * added Blackheart's diffs for using gdbm. See PACKAGE_GDBM for details; probably this should be merged with Descartes' PACKAGE_DB stuff ... * added Avenger@CD's diffs for a union array operator (|) (with trivial changes and a array stat fix) Works analogously to &: ({ 1, 2, 3 }) & ({ 2, 4 }) = ({ 2 }) ({ 1, 2, 3 }) | ({ 2, 4 }) = ({ 1, 2, 3, 4 }) * if ARRAY_RESERVED_WORD is defined, use "array" instead of "*" in error messages [e.g. "Bad assignment ( mapping vs array )"] * added Marius@Prilnari's fixes to lex.c: token pasting in preprocessor macro expansion and adds token quoting * added the -c option to the RUNTIME_LOADING compile flags since it disappeared somehow * Hidden object fixes for present() and environment() * COMPAT_BUSTER: removed the tail() efun; a simul_efun is in the compat dir * added leading / to log_error() filenames * cleaned up a bunch of duplicated code in array.c, and corrected a few statistic bugs * Parser package changes: . added the object name to some parser debugging messages . moved names of the applies to top of parser.c as #defines . information from the master object is now cached (parse_command_users, parse_command_prepos_list) COMPAT_BUSTER: this means parse_refresh() must be called if the information changes . livings_are_remote() is now rechecked when a parse_refresh() is done ---------------------------------------------------------------------------- (v22a41 promoted to v22b1) Mon May 27 16:20:09 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a41 * variable information is now stored only in the program in which the variable is defined; estimated compression ratio is about 10:1. YMMV * COMPAT_BUSTER: all inherits must now precede all global variable definitions * Added Ceda@IdeaExchange's fixes to the Windows '95 port * fixed compilation error in c_prepare_catch() * added a COMPRESS_FUNCTION_TABLES option, which compresses function tables even further (estimated compression: 2-3x) at the cost of slowing down function calls slightly (<5-10%) * Fixed error() to correctly added a trailing \n to error messages that are missing them * Crasher fix in mapping composition (from Avenger@CoreDump) Sun May 26 00:37:08 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a40 * internal function aliases are handled a little smarter, anticipating more function table memory optimizations later * fixed some crashers/problems involving #pragma optimize and some compiler errors * fixed a crasher in passing a filename that wasn't a string constant to dump_prog() * program_info() can now take an object as a first arg * fixed a problem that would cause functions that were prototyped before inherited to call the first function defined in the object instead. Fri May 24 00:30:10 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a39 * terminal_colour() now has two more optional args; the 3rd is the width to wrap at, and the 4th is the indent for lines after the first * Fixed a crasher in some Too deep recursion errors * Fixed crashers in constructs like while (...){ e = catch { break; } } Jumping out of a catch block is now illegal. * Fixed a crasher in program_info() when there are objects without type information loaded Thu May 23 15:46:10 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a38 * YYTYPE's size changed from 10 to 8, which should make the compiler slightly more efficient. * Fixed a bug in the generation of information to pass to mudlib error handlers, which would cause an "Illegal array size" error to be flagged before the error handler was even called. * A few changes to $() notation: . $() now moves out one level, not all the way out. So, to use a local variable in a function from inside a doubly nested function pointer, one needs to use $($()), e.g.: string x; function f = (: (: $($(x)) :) :); . Due to the above change, constructs like $($1) are now legal, and work as one might expect, e.g.: function f = (: (: write($($1)) :) :); // The inner function // function pointer writes whatever is passed // as the first arg of the outer one function g = evaluate(f, "hi"); // creates a function pointer that // writes "hi" . this isn't really that complex; just remeber the rule "Each $() temporarily removes one level of (: :) nesting." Familiarity with functional programming is also recomended; (: (: :) :) constructs are function pointers that create and return function pointers when evaluated, _not_ simply composite functions. . there is now a limit to function pointer nesting; the default is 10. (Anyone who needs more is sick, but I thought I'd mention it) . this also fixes a few crashers in using $() inside doubly nested function pointers Mon May 13 23:16:05 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a37 * Fixed a crasher in redefined functions * added a STRIP_BEFORE_PROCESS_INPUT option for NO_ANSI * fixed call_out() to pass zero args if zero args were specified, instead of always passing a first arg of 0. (Usually, you'd never notice, but it makes a difference when scheduling call_outs to efun pointers to efuns which take no arguments) * COMPAT_BUSTER: call_out_info() elements now have only 3 elements, not 4; this is due to argument handling restructuring, as well as mild security concerns for reference types. Maybe an option will be added to get the arguments at a latter date if it is desired. * minor tweaks to the cleanup rules in the makefiles to get rid of a few irrelevant files in the diffs * added Maarten de Jong's documentation on compiling MudOS on an Amiga using gcc as amiga/README-gcc. * Changed ED_MAXLINE from 512 to 2048 * Warning for using | or & when both arguments are "boolean" values (e.g. the result of !, ==, !=, <, etc) Mon May 13 00:29:11 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a36 * Fixed a crasher in memory_summary() when some objects are swapped. * Fixed a crasher in check_memory() when BINARIES was #undef'd * '\"' -> '"' in rc.c, since the former confuses emacs's hilit19 mode * Better fix for the undefined function problem; the old solution occasionally didn't work on some systems * Fixed a problem with aliases in the function table that would sometimes cause ... args not to be handled right * Fixed a crasher involving prototypes preceding inherit statements * program_info() now calculates the overhead of save_types as well Sat May 11 20:28:19 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a35 * Reversed the function table search order in the new call_other search code to be consistent with overload search order * fixed a crasher in generated error messages for OBS rules which have an indirect object * added some entries to the files Bugs and Ideas * load_binary() now sorts the function table so it is in the correct order again since the order of shared strings is different from when it was saved * fixed a bug in the apply_low cache code which was accidentally using 'prog', a global, with disastrous consequences when valid_save_binary was called during the tail end of compilation. 'prog' is no longer a global, and is returned where needed. * fixed a bug which caused the identifier hash table to become trashed when a function was used before it was defined * 'make clean' now removes the testsuite's compile error log too Fri May 10 22:21:39 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a34 * moved strput() from the parsing package to the main distribution so it can be used internally * Changed the building of compiler error messages to use strput(), avoiding possible buffer overruns. Normalized the max length of most compiler error messages to 256 bytes. * Fixed compilation of PROFILE_FUNCTIONS * Fixed a bug introduced last pl that caused the call_other cache to malfunction * Fixed octal escapes in strings; they were getting omitted * Fixed a crasher in unterminated @ blocks (which, by the way, had absolutely nothing to do with /V\\age) Tue May 7 14:23:45 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a33 * moved the call to save the ed buffer of a user to before the call to net_dead() * Rewrote most of the function table handling code. Memory overhead is now 15 bytes per function defined and 5 bytes per function inherited, instead of 14 bytes per function inherited or defined This cuts function table memory usage about in half on a stock Lima lib. YMMV. Large open MUDs may see larger decreases; the program_info() efun is a good way to check. * Removed the last traces of OLD_PREVIOUS_OBJECT_BEHAVIOR * The inheritance warning is now a bit clearer, e.g.: foo() inherited from both /std/foo.c (via /std/bar.c) and /std/bazz.c; using the definition in /std/foo.c * Fixed the parsing package to not crash on reference to 'me' when 'me' isn't within sight (admittedly, an odd situation :-) ) * Fixed the testsuite to realize call_stack(3) now returns strings * Tables of defined functions are now sorted, so they can be binary searched; call_other time is now approximately O(m log n) instead of O(m n) when the cache is missed (m = # of inherits, n = # of functions in each) * Removed OPTIMIZE_FUNCTION_TABLE_SEARCH: the new search method is just as fast with no overhead * added Raistlin's patch for a parser bug that would cause the verb name to get inserted at the start of the 'real names' section of parser callbacks Mon May 6 21:47:59 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a32 * Small optimization to arrange_call_inherited() * Small cleanup to C function pointer handling in dumpstat.c * fixed a bug that caused dumpstat.c to ignore the size of array headers * Fixed the check_memory(1) table to be formatted nicer * removed outdated code from program_info(); also fixed a bug that caused the header size to be an absurd value * fixed a crasher in function_owner() [ref count bug] * added a memory_summary() contrib efun, which returns a mapping of with entries: map["program name"]["variable name"] Each entry contains the number of bytes used by that variable in all active instances of that program. The size of shared structures is divided up evenly between all values that reference it. * Made the parser end of buffer checks a bit easier to maintain * added parse_remove(string verb) which removes all rules for the verb 'verb' which were added by this_object() Mon May 6 14:23:47 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a31 * Added a FLUSH_OUTPUT_IMMEDIATELY option, which disables buffering of output. Useful for debugging. * Parsing package fixes: . Fixed a bug that caused OBS rules to silently do nothing if all the possible matches return errors beginning with '#' . COMPAT_BUSTER: Now, zeros are passed for args that aren't available yet (i.e. the indirect object in direct_foo_obj_bar_obj()). Also, the arg which is currently being worked on is now passed again (i.e. the direct object in direct_foo_obj_bar_obj()) Summary: "foo sword bar wiggle" would call: . can_foo_obj_bar_obj(0, 0, "sword", "wiggle") . direct_foo_obj_bar_obj(OBJ(sword), 0, "sword", "wiggle") . indirect_foo_obj_bar_obj(OBJ(sword), OBJ(wiggle), "sword", "wiggle") among other things . Fixed a number of bugs and buglets in disambiguating parses and generating error messages, especially in cases where all of the attempts produce nonsense Sun May 5 14:52:20 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a30 * added NAME_TRUE_VARARGS flag to disassembly listings * propagate NAME_TRUE_VARARGS up the inheritance tree to avoid incorrect argument type errors when #pragma save_types is in use * Parsing package fixes: . made the maximum tokens per parser rule configurable at the top of the parsing package [MAX_MATCHES] . Optimizations to bitvec routines: bitvec_count(), get_single() in the parser . Fixed several spots where > MAX_NUM_OBJECTS involved in a parse would cause crashes . Fixed strput/strput_words to not write past the end of their buffer when constructing long strings . Fixed a crasher in parse_add_synonym() (though it wouldn't crash until the synonym or parse_dump() was used) Thu Apr 25 01:32:46 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a29 * fixed a bug that would cause call_outs which were exact multiples of CALL_OUT_CYCLE to be delayed by one CALL_OUT_CYCLE (sometimes could happen with call_outs that differed by a small multiple of 2 from this) * removed an unused local in repeat_string * Fixed the parsing package to not crash when given a line containing more than 256 words (now it just returns; the limit can be set at the top of parser.c) Tue Apr 23 16:58:34 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a28 * added a contrib efun: repeat_string(string s, int n) which essentially does: sprintf("%-*'"+s+"'s", n, ""), but is readable. e.g. repeat_string("-=", 10) == "-=-=-=-=-=-=-=-" * redesigned call_outs slightly to allow constant time insertion * added a CALLOUT_HANDLES option, which has the following effects: . call_out returns an int, which can be passed to the following two efuns: remove_call_out(int handle) find_call_out(int handle) . Note that using the handle is more efficient than using the ob, function name version Tue Apr 16 11:29:13 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a27 * updated with respect to v21.7b21 * Fixed sort_array to work correctly when called from a sort callback Sun Mar 10 05:32:19 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a26 * updated with respect to v21.7b20 * Added Raistlin@IE's fix for a bug in replaceable()'s one argument case introduced in v22a23 which caused the one argument form to quit working * Fixed the ARCH define for 386bsd to not override the FreeBSD define * changed "stuf!" -> "unknown architecture", when ARCH cannot be determined * added a classp() efun * added support for \012 octal escapes and \x1e hex escapes in strings and character constants * added a comment about what the legal values of CFG_LIVING_HASH_SIZE are * crasher fix in the database package * put a remove_interactive() call back in that accidentally got removed at one point, which caused the driver to busy loop until a message was sent to the object whose link had died * COMPAT_BUSTER: two changes to call_stack(3): first, use strings instead of numbers to be consistent with origin(); second, a bug was fixed which was reporting the origin of the frame below the indicated frame, not the frame itself. * fixed compilation on systems that use _SC_PAGE_SIZE, not _SC_PAGESIZE Mon Mar 4 20:36:27 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a25 * updated with respect to v21.7b19 * added code to flush message queues when closing connections and shutting down * added a flush_messages(void | object) efun for manually flushing message queues (during a long thread of execution, for example) * fixed a bug that would cause some anonymous functions to not be bindable * fixed a crasher in recursive structures in error traces * fixed a bug in sprintf() column mode that would wrap early if a fit exactly in the width given Fri Mar 1 13:33:14 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a24 * added Pace@Callandor's patch for REVERSIBLE_EXPLODE_STRING * made PARSE_NUMERIC() into a routine instead of a macro, and added support for scientific notation so that very large/small floating point values restore correctly in restore_svalue() and friends Mon Feb 5 09:43:36 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a23 * updated with respect to v21.7b18 * added a 'parallel' target for parallel makes when using gmake * protected process_command against this_player() changing or being destructed during process_input() and other nasty places * removed the DEBUG_COMM_FREEZE code * made the message queue flushing a bit lazier which should result in smoother output and larger packet sizes * added Descartes' database package * added heart_beat_info() as a synonym for heart_beats() when COMPAT_32 is on * replaceable now can be optionally passed a second array argument which is a list of function names to ignore; if the second arg is left out, ({ "create" }) is assumed, which gives the old behavior. * added a function_owner(function) contrib efun. * made #undef PACKAGE_SOCKETS/#define PACKAGE_EXTERNAL compilation fail more gracefully * fixed a parser callback bug that caused the 'real names' of omitted args to be omitted too * added an error message for using the debug mode of parse_sentence when the driver wasn't compiled with DEBUG on * fixed a bug that would cause parse_sentence() to return large numbers instead of error strings * fixed a typo in the Incorrect argument to type %s error message. * fixed compilation when first_inventory() is disabled. Sat Feb 3 13:06:23 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a22 * fixed seteuid() to pass the correct second arg to valid_seteuid() * fixed the parsing package to not crash if parser_error_message() doesn't exist Sun Jan 21 21:29:34 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a21 * updated with respect to v21.7b16 * The master object and simul_efun object can be updated again when LPC_TO_C is not defined; patch from d.collins@ic.ac.uk * unified the code handling function pointers/extra args in various efuns; fixes crashers in rare cases. Also, sort_array() now takes additional args which are passed down the the function, like filter() et al. * Added a check for the /usr/ucbinclude directory in ./build.MudOS; Solaris needs from there * Removed push_string() internally; push_constant_string() should now only be used on string constants. The following changes will preserve previous behavior: . push_string(x, STRING_MALLOC) -> copy_and_push_string(x) . push_string(x, STRING_SHARED) -> share_and_push_string(x) . push_string(x, STRING_CONSTANT) -> push_constant_string(x) . push_constant_string(x) -> share_and_push_string(x) also, new function: push_shared_string(), which pushes and references a known shared string. * optimized the PORT_ASCII code a bit, and fixed some problems/loops in it in the presence of bad input/errors * fixed a bug that would cause message() to send messages/avoid the wrong people if the target/avoid argument was _not_ an array, and the function was called during the processing of another message call whose target/avoid was also not an array * removed XALLOC(), since it isn't used any more * fixed mapping hash distribution and centralized the definition of it * optimized terminal_colour a bit * optimized present() a bit; also fixed a leak in errors in id() functions * the message of the message() efun may now be of any type; this actually was side effect of a fix that makes message() more efficient :-) * fixed a crasher in sprintf() table mode, when no number of columns was specified (best fit) * improved the packages/ and mudlib/ dependencies a bit * configure.h is now remade if the information in 'uname -a' changes * no longer log a 'double call to remove_interactive()' if an object self-destructs in net_dead() * There is no longer a limit on the number of sockets available; if a limit is wanted it should be enforced in valid_socket() * fixed sprintf() column mode to wrap at the column width, not one before * added a couple testsuite tests for sprintf table mode * ./build.MudOS now prints an error message if an unknown kind of build is attempted instead of silently assuming the default * Parser changes: . Two new restrictions; only one plural token is allowed per rule, and only two object tokens are allowed per rule. The second may disappear after I clean it up a bit. . fixed a crasher in having more than MAX_NUM_OBJECTS involved in a parse . 'all' is now supported, also 'all of ...', 'all red swords', etc . Cases where more than one object are matches, but only one makes sense now work . in callbacks, only objects that have been completely parsed can be refered to. This means can_ and direct_ functions can't reference the direct or indirect objects. The corresponding spots in the argument list are missing. . OBS rules use the _obj_ callbacks, with the exception of do_ . error handling is now up to the master object via the parser_error_message() apply. The first argument is a int indicating the error type. The second is an object if this message corresponds to part of a plural match, otherwise it is zero. The third and following args depend on the error type (from include/parser_error.h): ERR_IS_NOT, ERR_NO_LIVING, ERR_NOT_ACCESSIBLE: the noun used, and then 0/1 depending on whether there ambiguity ERR_AMBIG: an array of objects that might have matched ERR_ORDINAL: The number that was refered to ERR_THERE_IS_NO: The string that couldn't be matched ERR_ALLOCATED: The error message returned by the mudlib ERR_BAD_MULTIPLE: nothing [note: if you want more info that you think the parser might have, let me know] compat/parser_error.c has a decent approximation of the old behavior . do_foo_obs() gets an array of objects and error messages as the arg corresponding to obs . Returned error strings which start with '#' are assumed to be nonsense messages, and aren't counted for the purpose of ordinals and all. Useful to prevent 'get all' from printing an error for yourself and the room, and to keep 'drop first sword' from counting swords in the room. Sat Jan 20 15:47:06 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a20 * removed process_string() and process_value(); simul_efuns are availaible in the compat/simuls directory * Fixed a memory leak in new(class foo, bar : baz, ...) * fixed compilation problems in grammar.y.pre, shallow_inherit_list, object.c * fixed a typo: m_indices() is keys(), not values(); also added m_delete * pluralization fixes: 'are', 'mackerel' * added Rust's timezone efuns to contrib; turned off by default since they may not compile everywhere Wed Jan 3 16:12:50 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a19 * updated with respect to v21.7b15 * All values which were previously 'null' are now undefined instead; nullp() is now exactly the same as undefinedp() * added a COMPAT_32 option, which tweaks a few things to allow some 3.2/3.2.1 code to be ported easier; see options.h for what changes * shallow_inherit_list() is now the same as inherit_list() [unless COMPAT_32 is on, in which shallow_inherit_list() is the MudOS behavior, and inherit_list() becomes deep_inherit_list() ] * error message change: Missing type -> Missing type for global variable * Don't raise type mismatch errors for code of the form 'identifier = expr'; 'Missing type for global variable' is good enough * Don't manually include and in interpret.c; trust configure instead * fixed a parser crasher in refering to 'noun', when more than 4 adjectives are possible * Fixed sprintf table mode to not stretch the last line to fit the field width Wed Jan 3 14:29:43 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a18 * fixed some serious flaws in class member lookup introduced in a17 Tue Jan 2 17:59:42 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a17 * updated with respect to v21.7b14 * fixed a crasher in the call_out leak fix from v22a1 * turned off PACKAGE_EXTERNAL by default * fixed a bug that caused the messages from saving the ed buffer of an object which was dested while in ed to be appended to the start of the next message sent to an object using ed. * check for wait3() as well before using BSD signals * removed wait() from lint.h since we include now * fixed a couple bugs in the handling of functions in the memory leak tracking code * fixed a crasher in add_action(function) when the driver is run with the -d flag * fixed the addr_server not to crash if gethostbyname() fails for some reason * function(...) { ... } is now rebindable if it does not reference local functions or global variables * switch (...) { case 0: function() { break; }; }, while (...) { function() { continue; }; }, and similar pathological code is no longer allowed. * bind(f, ob) now always succeeds if f is already bound to ob * added back the fast version of livings() from v22a14 as a contrib efun named_livings(); also fixed it to not return objects which are no longer living() * added class support in reclaim_objects() * trailing justification is no longer added to the last line of tables if no pad string was specified * The following is now legal: class foo { int x; string y; } class foo f1 = new(class foo, x : 5); class foo f2 = new(class foo, y : "foo", x : 1); Sat Dec 30 20:55:41 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a16 * updated with respect to v21.7b13 * changed the name of strerror to port_strerror to avoid prototypes on SunOS, which prototypes the function but never defines it * Removed a number of prototypes in lint.h for functions which are also prototyped in SunOS headers now * Fixed a bug that would prevent two way communication with external commands * Small optimization to the string case of socket_write * Tracked down the real problem which caused sprintf() to crash on empty tables; also fixed a crasher empty lines in column mode * reversed the livings() patch, since not all living objects are in the hash table * #ifdef'd out some unnecessary code for when LPC_TO_C is off * Remember to wait on our children, so we don't create zombies; configure checks to figure out whether to do it the BSD or Sys V way * Removed some archaic defines from portability.h * Changed the parse_sentence return codes again: 1 - success 0 - no such verb -1 - verb exists, but no rule matched -2 - a rule made sense, but can_ or direct_ failed * Fixed a typo in the 'Illegal master object file name' error message Fri Dec 8 20:53:11 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a15 * updated with respect to v21.7b12 * changed livings() to walk the living hash table instead of the full object list; idea from Jihad * '\r' is now treated as whitespace by the compiler * The success return code of parse_sentence is now 3, not 1. * changed the return type of parse_sentence from 'int' to 'mixed' * Fixed a crasher in using a function pointer as a read callback * If PACKAGE_EXTERNAL is defined, then lines of the form: external_cmd_1: /usr/local/bin/gzip in the config file allow the mud to run the command using the following efun: int external_start(int which, string args, mixed read_cb, mixed write_cb, mixed close_cb) which is the command number (e.g. 1 from the example above) args is the argument passed to the command. A socket is returned, which can be used to communicate with stdin/stdout of the command. valid_socket() is passed "external" as the operation. Up to 5 commands are allowed. Thu Dec 21 01:33:34 PST 1995 (gstein@svpal.org (Deathblade)) * raised patchlevel to v22a14 * fixed varargs by tweaking grammar.y.pre to not turn off the TYPE_MOD_ARRAY flag for the varargs variable * fixed sprintf() crasher when tables are used (Rust and Zakk) Thu Dec 7 12:30:20 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a13 * fixed crasher in disabling a heart_beat during a heart_beat * fixed sprintf() to not add trailing padding onto wrapped strings * removed the break_string() efun. See compat/simuls/break_string.c for a replacement. * fixed a few more misoptimizations of last variable references by the optimizer. * added a warning for putting varargs args into a variable of non-array type, also fix a bug that would cause type errors if the prototype was in scope * parse_sentence now returns: 0 - no such verb 1 - verb exists, but no rule matched 2 - a rule made sense, but can_ or direct_ failed in the cases where it used to return zero. * parse_add_rule no longer has a third arg; it is always this_object() * New parse efun: parse_add_synonym(string new, string old): . interpret the verb 'new' as if it were the verb 'old', and parse using 'old's rules and routines parse_add_synonym(string new, string old, string rule): . 'new' acts like 'old' for only the rule 'rule', which must have been previously added. Can be called multiple times. Wed Dec 6 18:00:15 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a12 * fixed a crasher in passing a negative number as the field width via the '*' specifier * fixed a crasher in strings which were too long to fit into tables in table mode Tue Dec 5 19:30:12 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a11 * fixed two crashers in the table generation logic of sprintf(), also fixed a bug that would cause the second and following lines to be indented wrong * fixed tables to fully fill the space allocated to them in the format description * The fill pattern for tables and columns always fills out the entire 'box' now; e.g. printf("%#|30'.'s\n", "apple\nbannana\ncherry\ndonut\nelf\nfruit\n") gives: ...apple....cherry......elf... ..bannana....donut.....fruit.. and not: ...apple....cherry......elf ..bannana....donut.....fruit Mon Dec 4 16:13:59 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a10 * updated with respect to v21.7b11 * moved values_list in function_context_t and node in decl to align slightly better * fixed the direct/dirent check to include std_incl.h in case it has some defines needed by those files * removed some really old and unused files of the compiler %union (address and funp; the second of which predates me ...) * small optimization to the lexer's handling of comments in preprocessor lines * major changes to sprintf.c: . COMPAT_BUSTER: error messages are never returned any more, but are thrown as errors instead. . 'clean' is no longer used, so cannot be leaked . COMPAT_BUSTER: "%^" is no longer special (for efficiency reasons, as well as disagreements on the exact algorithm) . The format string is never written into, eliminating the need for savechars and related hacks; fixes a crasher in extremely long strings in tables (>2k) . The setjmp()/longjmp() is gone, since the cleanup can be done on the next call to sprintf() now . sprintf() is now officially not reentrant, and you will get an error if you try. It probably crashed before if you tried it. The only LPC code called by sprintf() is object_name(), so this shouldn't be a problem . on the whole, things should be significantly faster (slightly more than 3 times faster on the small example I used), mostly due to collecting sets of characters instead of adding characters individually, and removing redundant length calculations . large portions of the file are now actually readable Mon Nov 27 22:51:35 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a9 * updated with respect to v21.7b10 * COMPAT_BUSTER: The scope of for and foreach loop variables is now only the inside of the loop. This also fixes a bug demonstrated by the following: { int i; for (int j;;) ; } { int i; } * Some error message changes: . Indexing on illegal type -> Value being indexed is zero/Cannot index value of type 'foo'. . Indexing a (string/array) with an illegal type -> (String/Array) indexes must be integers . Negative index passed to array -> Array index must be positive or zero Wed Nov 22 12:52:13 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a8 * updated with respect to v21.7b9 * fixed a typo in ./build.MudOS (CC -> $CC) * fixed a crasher in copying parse_command_* arrays which are empty Tue Nov 21 17:16:10 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a7 * updated with respect to v21.7b8 * fixed the ar test to make sure comptest.o exists in ./build.MudOS * Leading and trailing whitespace in the values in the config file is now ignored Wed Nov 15 14:41:20 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a6 * updated with respect to v21.7b7 * Better system for reporting bad malloc configurations (two malloc packages, etc) and system configuration errors * Report a redefinition error if classes with the same name are inherited from different files * Fixed the "Return type doesn't match prototype' error message to only be printed once per occurance, not twice Tue Nov 14 12:53:51 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a5 * updated with respect to v21.7b6 * A few small tweaks to the testsuite cleanup * fixed crasher in printing a string containing a '%' when NONINTERACTIVE_STDERR_WRITE was defined * some small cleanups to includes in socket_ctrl.c Tue Nov 7 17:50:22 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a4 * updated with respect to v21.7b5 * updated all the Makefiles with respect to Makefile.master * minor change: use 0 instead of -1 for master_ob not loaded yet since we no longer have to distinguish between unloaded/not loaded yet * added MDmemcheck() which can be inserted into the source to do internal memory consistency checks and abort if corruption is found * added back some parser fixes that were missing due to reversed patches * Two new options to ./build.MudOS: - ./build.MudOS develop -> turn on warnings and debugging code - ./build.MudOS debug -> turn on debugging symbols and code Fri Nov 3 16:41:11 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a3 * updated with respect to v21.7b4 * couple changes to void handling, basically (int)->(void) is no longer legal. The following are now errors: . int f(void x) { ... } . ... { void x; } ... . void x; . class foo { void x; } . void f() { return 1; } * defining a variable is now allowed in foreach, e.g.: . foreach (string x, object y in z) * fixed a crasher in errors in parse_* callbacks Sun Oct 8 19:48:21 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a2 * updated with respect to v21.7b3 * COMPAT_BUSTER: previous_object() == 0 and not this_object() in heart_beats * remove_call_out(/* no arg */) now returns 0 always, not -1 * fixed a bug in the replace_string() with all 5 arguments in some cases * fixed a bug in restoring mappings which had arrays/mappings/ floats as keys * added some missing newlines to regexp() error messages * fix to the center/left justify case for ints; remember to add the padding to the right side as well in sprintf() * more testsuite efun tests; finished through 'sprintf()' or so * made it illegal to undefine or redefine a global define like __VERSION__ * added a NO_RESETS option * better error message for people who don't choose a malloc package * fixed various crashers involving passing garbage back to the parser inside arrays * fixed leak in sprintf() for printing recursive structures; attempting to do so no longer errors. Sun Oct 8 19:27:28 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a1 * removed some outdated code (c_filter() and f_creator()) * fixed a crasher in removing heart_beats during a heart_beat * fixed a leak in call_outs with more than one extra argument * fixed a leak in illegal arguments to call_stack() * fixed set_light() to compile with NO_ENVIRONMENT (for the ultimate in bleeding edge uses of archaic efuns :) ) * added some checks to make compilation bomb more informatively if two malloc packages/wrappers are specified * cleaned up the signal handling code a bit * fixed compilation of the matrix package * fixed compilation with NO_ENVIRONMENT and !NO_ADD_ACTION * fixed compilation with DO_MSTATS and SYSMALLOC * fixed testsuite to compile and work with either setting of INTERACTIVE_CATCH_TELL, NO_ADD_ACTION, PACKAGE_UIDS, NO_ENVIRONMENT, NO_WIZARDS, PRIVS * revamped the testsuite efun tests, and added tests for most of the efuns 'a' through 'r' or so * testsuite now logs compilation errors to /log/compile ---------------------------------------------------------------------------- v21.7a10 promoted to v21.7b1 Fri Sep 22 22:51:20 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a10 * fixed a bug that caused case 0: to not work in string switches * fixed a typo in the unknown pragma error message * rule priority is now calculated beforehand in the parser; this fixes the precedence of some errors and allows earlier shortcutting * 1st through 9th and first through ninth are now understood by the parser * "Which X do you mean?" is now more verbose * 'myself' is now the same as 'me' Mon Sep 11 03:37:53 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a9 * fixed debug_info(2, ...) to put all the info in the string; it was still sending some of it directly to this_user() * slight optimization (condense two consecutive strlen() calls) in regular expressions * -DPEDANTIC now allows the use of inline to be turned off, since gcc only defines __STRICT_ANSI__ when -ansi is used, and not when -pedantic is used, but -pedantic complains loudly about inline, and -ansi causes the SGI headers to break. Unfortunately, gcc only gives some useful warnings when -pedantic is on * fixed up some (unsigned char *) <-> (char *) problems * fixed an optimizer bug that would clobber range expressions and generate incorrect code * Added documentation of makefile targets to the makefiles * Added a .DEFAULT rule for the decoy makefiles so better errors are generated when the wrong make is used with a target * Made the SIGPIPE always reenable the handler, not just on Linux, since other OS's (Solaris) behave this way as well * Fixed the gettimeofday() check to use two args, so it wouldn't fail on BSD based systems * fixed a compile error in OPTIMIZE_FUNCTION_TABLE_SEARCH * added a handler to ignore SIGFPE for those systems that raise it * changed "create" to APPLY_CREATE in replaceable() * fixed a parser crasher when parse_command_users() doesn't exist * removed a if (pointer >= 0) check in the parser * fixed a crasher in the 'last match to error' handling in the parser * fixed a crasher in parse_command() when the object array had non-objects in it * fixed some NO_ENVIRONMENT compilation problems, especially when NO_ADD_ACTION was NOT also defined. (add_action w/o environments is a tad pointless, but it works now) * fixed a bug that cause query_verb() to only return the matched portion and not the entire verb * fixed (s)printf() to not print destructed objects Fri Sep 8 03:34:50 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a8 * updated match_path() to know about the mapping changes * preliminary OBS changes; OBS and LVS are recognized as tokens now; currently they behave exactly the same as OBJ and LIV * fixed a few uses of new_string as a variable name * fixed a parser in generating arguments for parser callbacks Sun Sep 3 21:47:54 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a7 * cleaned up -Wall compile * better code to check the string statistics, leading to: * fixed the string stats bug(s); the figure should be correct again now * improved the error message for "owner of function pointer destructed" * removed the storing of the hash value in mapping nodes; mapping memory usage should be down ~20%; also optimized a bit, so most mapping operations should be faster * crasher fix in %o case of parse_command() Wed Aug 30 19:36:35 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a6 * crasher fix in edit_source -configure from Valodin * moved the CONFIGURE_VERSION define to the end of configure.h so incomplete configure.h files are detected as corrupt * removed the each() efun * crasher fix in the optimizer (no local variables again) * updated the tag info in check_memory(1) * fixed check_memory() to not accidentally complain about the string it is building * fixed a bug in the mark and sweep memory debugging of the parser * fixed a crasher in verb handlers that call parse_refresh() * fixed a memory leak in objects that call parse_refresh() * remember to add the real names when calling can_* callbacks * fixed a bug that would cause parser error messages to be truncated * fixed a memory leak in incoming MUD mode socket packets * added a bunch of bug reports to Bugs * fixed a line number bug in '\' * fixed @@ to work again, evidentally noone has used in in over a year since it hasn't worked since Robocoder added L_ARRAY_OPEN ... * fixed odd errors if the end of the input buffer is hit while parsing a macro expansion; found by Tensor * fixed a line number bug in macro arguments with newlines in them Tue Aug 29 17:11:06 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a5 * updated with respect to v21.6b6 * Merged in Descartes' diffs for Windows NT and Windows 95. Someone please check these; I fixed/changed a bunch of things, but have no way of testing them, and there are probably some mistakes. * removed the old OS2 code, since noone ever got it to work ... * added support for foreach (int in string) * fixed a fatal error when a string > 64k in size was added to an outbuffer. * changed sprintf() to use outbuffers, speeding up sprintf a bit, and expanding the size limit to 64k * fixed type error for sizeof(array constant) * it's now legal for an ed range to go past the end of the file; any line # greater than the file size refers to the last line. * fixed a bug that caused varargs contraction to not be done when the call_other cache was hit, or when one does inh::foo() Sat Aug 26 19:37:38 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a4 * reorganized the function_t struct slightly to save a bit of memory * added a warning for return types that don't match their prototypes; currently ignores modifiers, since accepted usage is so gross in this respect it isn't even funny. The next item might help: * added "private:" which makes all function definitions/globals after it private (until the next such section). Works with any type modifier (static, private, protected, public, nomask, varargs) * optimization fix: remember to put the replacement node in the tree when doing: if (x) {} else y -> if (!x) y * catch, time_expression, and __TREE__ now generate explicit code to pop the value instead of doing it inside F_END_CATCH. This makes the grammar a bit simpler, and generates better code for catch { ... } and catch(x = ...), which are common cases * fixed sizeof( ({ ... }) ) to preserve side effects inside the array constant, for crappy code like sizeof( ({ i++ }) ), which now compiles to: i++, 1 * changed edit_source to include configuration info when doing tests, so we can check for defines in include files * run ranlib on the mudlib/ and packages/ files for systems that need/ like it. * added a WRD token in the parser, which is just like a STR but only matches one WoRD. * fixed a bug that chopped a letter off the results returned by STR rules * xxx_verb_yyy() callbacks now include the name of the verb in the 'real names' part of the argument list, so for example "kick! beek" would call (among other things): can_verb_obj("kick", OBJ(beek), "kick!", "beek") This should satisfy the people who have been mailbombing me asking for a way to get at the real form of the verb :) * fixed a few warnings in the parser * When the return value of a construct is unused, and the construct has no side effects, replace it by it's arguments (recursively) possibly eliminating the construct entirely. i.e. the following generates no code: int x; class bar y; array z; ((({ ~x })[!x..foo)[(x*2)-1..] : ([1:2, 3:x])), -z[x]); Thu Aug 24 06:58:46 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a3 * configuration checks for broken libg.a Linux configurations, , -ldl, RTLD_LAZY * try cc -E -traditional-cpp as a possible preprocessor in build.MudOS * Use ANSI USHRT_MAX instead of MAXSHORT if availiable * reworked the handling of novalue efuns to be more robust; fixed crashers in (void efun) || (void efun) among other things. * Patches from Symmetry: . made Config.Example match the testsuite setup . fixed mapping case in dump_variable() for testsuite . bugfix in resolve_path() in testsuite . allow (: function() { return $1; } :) . optimize x[y..<1] to x[y..] . optimize dested obs in F_TRANSFER_LOCAL . crasher fix for swapped objects in program_info() . fixed disassembly of efun function pointers Mon Aug 21 03:58:32 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a2 * fixes from Symmetry for #undef RUNTIME_LOADING * added Zakk's query_ip_port() contrib efun for finding out which port an object connected to * fixed a parser bug that would sometimes cause objects to fail to be recognized the first time they were referenced. Many, many thanks to Deathblade for helping to track down this one * Added filenames to the parser error messages * improved the handling of punctuation; verbs do NOT include punctuation again, although this may change; stay tuned ... Thu Aug 3 20:25:27 EDT 1995 (tim@handel.princeton.edu (Beek)) * created v21.7a1 from v21.6b3 * valid_compile_to_c() in the master object now controls the use of the generate_source efun. * RUNTIME_LOADING works if your system supports dlopen()/dlsym(); define it in options.h, then use generate_source(filename) to load the object. Note that /lpc2c in the mudlib must be a symbolic link to the driver source. Objects loaded in this manner do not show up on lpc_info() [yet] * The restriction which disallowed cloning of objects with environments was removed * destruct()'ing the master or simul_efun object now fails if a new copy can't be loaded. This means that once the mud starts, a master or simul_object is ALWAYS loaded. * preliminary changes for disallowing calls to private functions; you can still get past it in odd cases (e.g. calling the function before you inherit it) More changes in a patchlevel or two. * fixed a bug that caused // and /* to be interpreted as comments within continuation lines in #define's * fixed the F_WHILE_DEC optimization, and added support for it in loops of the form 'for (...; x--; ...) { ... }'. Centralized the handling of loop test optimization. * optimize empty blocks for if's * removed some mentions of 'actlab' in the docs * added some new exit codes to the Exit_Codes doc * added NO_ENVIRONMENT in options.h * fixed the disassembly of F_LOOP_COND_NUMBER * fixed a crasher/wierd behavior in using 'array' to declare arrays * fixed a bug that made using a (blank) simul_efun object necessary * added DEBUGMALLOC support for the parsing package * added support for classes in copy() * fixed a bug that chopped the last letter off of some parser error messages * updated the testsuite lib to run under the default driver configuration ---------------------------------------------------------------------------- (v21.6a11 promoted to v21.6b1) Tue Jul 18 02:23:22 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a11 * updated with respect to v21.5b10 * fix from Marius for a crasher in x[C introduced during the compiler rewrite * only include if MAXSHORT isn't in * fixed a crasher in filter() * fixed 'safe' -> 'saves' in pluralize() * fixed TRACE compilation with NO_WIZARDS * fixed regexp() to not crash on eight-bit characters in the format on hosts where 'char' is signed Sat Jul 15 14:35:50 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a10 * updated with respect to v21.5b9 * backed out the VOLATILE changes to compile_file.c since it relies on a gcc extension * fixed a crasher in true varargs functions with local variables * added configure checks for and * fixed a crasher in undefined functions * COMPAT_BUSTER: filter_mapping() now passes the value as the second element, just like map_mapping() * fixed the Makefile to support options in grammar.y.pre; this probably should be changed to use a %include "options_incl.h" * added y.output and tmpdepend to 'make clean' * fixed `system_libs` -> `cat system_libs` in the Makefile * fixed a few DEBUG crashers in the parser package Thu Jul 13 04:05:49 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a9 * updated with respect to v21.5b8 * backed out the VOLATILE changes to sprintf.c since it relies on a gcc extension * updated the Makefile not to define EDIT_SOURCE any more * implemented the parser generated error messages for the parsing package * added the other half of varargs support, allowing the following: void log(string file, string fmt, array args ...) { write_file(file, sprintf(fmt, args ...)); } void foo(int x) { log("/log/foo", "foo() was called with: %i\n", x); } Thu Jul 6 03:52:27 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a8 * fixed to_float("illegal string") to always return 0.000000 * added testsuite tests for to_int() and to_float() * fixed a crasher in illegal indexes to array constants * 'make depend' now works again when using GNU make * edit_source -configure is never rerun if configure.h exists, even if the file is out of date (it takes too long, and the info shouldn't change). * fixed a dependency problem that caused configure.h not to get built * DEBUG is now visible to %ifdefs * check for ; MAXSHORT is there on SGI * removed some unused variables * added __TREE__(expr) and __TREE__{ ... } which evaluate to arrays representing the compiler's internal representation (IR) of the given code. For example, __TREE__(x + y) gives: ({ "binary op", "+", ({ "opcode_1", "local", 0 }), ({ "opcode_1", "local", 1 }) }) * catch { ... } and time_expression { ... } are now legal. * if ARRAY_RESERVED_WORD is on, then 'array' now associates with the type and not the var, for example: int array x, y == int *x, *y and not int *x, y * 'array' by itself is now allowed, meaning 'mixed *' * fixed a bug in type checking that allowed 'x *' and 'x' to be compatible in one order, but not the reverse Fri Jun 30 16:44:33 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a7 * updated with respect to v21.5b6 * merged Makefile.MudOS back into the main Makefile * added implode(array, function, mixed) where the third argument is the value to start with, as in: flatten(arr) { if (arrayp(arr)) return implode(arr,(: $1 + flatten($2) :),({})); else return arr; } * fixed make_func.y to give file and line numbers on fatal errors * added configure checks for getrusage(), times(), gettimeofday(), and fchmod() instead of using hard coded information * figure out the correct type for UINT32 in configure * removed the 0.9.18 compat efun package * fixed a crasher in remove_interactive() * disabled the lookat_rotate2 efun in the matrix package as it uses more arguments than the compiler currently supports Tue Jun 27 01:10:27 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a6 * fixed the debug checks to not panic on nested foreach's * fixed edit_source -configure to not get fooled by OSF's queer non-standard BSD compatibility includes * fixed a crasher in passing a bad argument to call_stack() * optimized upper_case() and lower_case() * fixed an ANSI style declaration in eoperators.c * a couple minor fixes for alpha; also fixed DEBUGMALLOC to work correctly on alphas Fri Jun 23 02:39:02 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a5 * updated with respect to v21.5b4 * fixed a bug that caused sizeof(array constant) to always be 16 Tue Jun 20 16:25:14 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a4 * updated with respect to v21.5b3 * fixed a few bug in using x[y..z] as an lvalue * fixed an error in setting the return type of time_expression() * added packages/parser.c, a flexible parsing system for interactive fiction applications * fixed a crasher in variables() * added a workaround for getting EINTR while trying to seek the swap file Sun Jun 18 11:33:07 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a3 * fixed a bunch of warnings from gcc -Wall * fixed c_update_branch_list() to not generate unused labels * COMPAT_BUSTER: origin() and typeof() now return strings. If you use the defines in the driver include/ files, you're fine (assuming you update your includes) * fixed some compilation problems with local variable optimizations * put the mudlib/ directory back to the default one * fixed a bug that was disabling the while_dec optimization * efun::new() is legal again * the type info in functions() are now strings * variables now has an optional flag just like functions * fixed a bug in replace_string() that would not copy the elements which matched the search string which were not replaced in the case when the replace string is longer than the search string Thu Jun 15 09:15:23 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a2 * updated with respect to v21.5b2 * made functional procedures in LPC->C static so they don't interfere across multiple files * fixed a bug that inserted extra to_int/to_float() calls even when the expression had already been reduced as a constant, i.e. 1 + 2.3 -> 3.3 and not to_float(3.3) * reorganized the compiler's intermediate representation to be easier to optimize/generate code from. nodes now have general types like NODE_BINARY_OP instead of the old form. * removed support for PRAGMA_EFUN * optimized the last use of a local in a frame by transfering instead of copying. If the last use is in a switch() or loop it is ignored. The same trick is also done for use of a local right before an assignment, as in: write(x); x = 1; (only done when #pragma optimize is on) * split F_LOOP_COND up into F_LOOP_COND_NUMBER and F_LOOP_COND_LOCAL Mon Jun 12 04:45:44 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a1 * expression function pointers, anonymous functions, and foreach now work in LPC->C code. * added class support in LPC->C code * updated ccode.c with the icode.c cleanups * added a warning for [x] and [y..x] when x is a negative constant * optimized LPC->C string constants * optimized the calling of efuns. All arguments are now checked automatically. The format is now: . efuns which _always_ take one arg have opcodes like eoperators . New efun eops which includes the number of arguments F_EFUN0, F_EFUN1, F_EFUN2, F_EFUN3 which is followed by the efun index . F_EFUNV for efun calls using 4 or more args * some reorganization and cleaning up of make_func.y to allow the above * inlined efun calling for efun pointers. This should make (: efun, ... :) significantly faster than (: efun(...) :) --------------------------------------------------------------------------- (v21.5a6 promoted to v21.5b1) Sat Jun 3 21:32:15 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a6 * updated with respect to v21.4b11 * fixed a bug in replace_string(x, y, z) when strlen(y)==strlen(z)==1 and another one when strlen(z) < strlen(y) * added a ... operator which expands an array into a list of arguments. it is legal in varargs efuns, function calls, varargs efun pointers, and array constants (the last can be useful; ({ x, y..., z }) is the same as ({ x }) + y + ({ z }), but slightly faster) * COMPAT_BUSTER: removed the apply() efun. A replacement is in the (new) directory compat/simuls. Basically, apply(f, arr) is now the same as evaluate(f, arr...) * fixed the space saving code that only generates a return 0 if the function doesn't end in a return to recognize the return_zero opcode Sat Jun 3 05:33:46 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a5 * fixed a bug in call_all_other that would return zero for all items other than the first Thu Jun 1 14:55:53 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a4 * updated with respect to v21.4b10 * COMPAT_BUSTER: If process_input returns a string, it behaves as before. If it returns a non-zero integer, no further processing will be done. In all cases, process_input will continue to be called if it exists. Mon May 29 22:28:50 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a3 * updated with respect to v21.4b9 * fixed a crasher in call_all_other Sat May 27 02:44:33 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a2 * updated with respect to v21.4b7 * optimized replace_string(foo, bar, bazz) when strlen(bar) is 0 or 1 Fri May 26 15:58:23 1995 (tim@handel.princeton.edu (Beek)) * created v21.5a1 from v21.4b6 * added the following diffs from Symmetry with minor modifications: . fixed type error messages to handle classes . optimized merge_arg_lists . optimized call_function_pointer a little . optimized call_all_other . support more general sscanf specifiers, including %(regexp), as well as %s%x and %s%% having the typical non-greedy %s support . small optimization to replace_program . made it so that set_heart_beat(0) and set_heart_beat(1) behave more consistently when called during a heart_beat . implemented heart_beats as an array which saves ~12 bytes in objects that don't have heartbeats --------------------------------------------------------------------------- (v21.4a9 promoted to v21.4b1) Tue May 16 07:07:17 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a9 * fixed a crasher in calling sprintf("...%O...") before the master had finished loading * fixed a few bugs in LPC->C compilation of string switch statements * fixed a problem with the GNUmakefile made by LPC->C * implemented ranges in switch statements for LPC->C * fixed a crasher in parse_command() * fixed catch() to work again from LPC->C code * fixed a crasher in dumpallobjects with respect to some function pointers * fixed a bug accidentally added last patchlevel which caused arrays and mappings to not restore when the 'noclear' flag was passed to restore_object Mon May 15 04:12:47 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a8 * fixed a bug that would truncate arrays/mappings sent over MUD mode sockets * added a missing #include of cfuns.h that caused undefined identifier errors during LPC->C compilation * specifying an address server in the config file is no longer necessary * fixed a crasher when the simul_efun object had no simuls in it * fixed a crasher in implode(array, function) * fixed a bug that caused catch() and function profiling to be ignored * fixed wierd behavior with respect to unterminated @ and @@ blocks * fixed a problem that would cause logging to fail of the log dir in the config file was specified as '/' Sat May 6 22:41:22 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a7 * updated with respect to v21.3b5 * fixed a ref count problem in heart_beats() * fixed a compilation problem for people who don't use 'local_options' * put the v21 README into the distribution * optimized implode_array * recognize IAC IAC as a quoted IAC character; this has two effects: . IAC can now be received by the mudlib . window sizes with widths and heights of 255 work again * fixed MUD mode sockets to work on machines where sizeof(long) > 4 * optimized member_array(), string compares, string hashing etc to check string length first; idea from Aragorn * fixed load_object() to not error if the file doesn't exist, also fixed the error messages to be better than 'Failed to load file' in many places * fixed a crasher in calling non-existent socket callbacks * fixed a few syntax errors in ed commands to not dump you out of ed * Added a bunch of stuff to Bugs/Ideas files; I'm going to try to keep them more up to date; dumped a lot of stuff from my todo list there * fixed generate_source() to not leak a file on some errors * fixed a bunch of problems with the upper_case() contrib efun; it was out of date with respect to counted strings * added Magician's remove_interactive() efun to the contrib package Sat May 6 19:03:29 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a6 * added 'mixed implode(mixed *, function)' /* sum all the elements in an array */ int sum(int *x) { return implode(x, (: $1 + $2 :)); } /* find the largest element */ mixed max(mixed *x) { return implode(x, (: $1 > $2 ? $1 : $2 :)); } /* with respect to an arbitrary function ... */ mixed max(mixed *x, function f) { return implode(x, (: evaluate($(f), $1, $2) > 0 ? $1 : $2 :)); } /* comma separated list of numbers */ string list(int *x) { return implode(x, (: $1 + ", " + $2 :)); } * cleaned up a lot of the Makefile dependencies Fri May 5 21:36:29 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a5 * fixed a typo in wrappedmalloc.h * memmove() is now checked in edit_source -configure * COMPAT_BUSTER: this_player() is zero is get_save_file_name(). The apply is now get_save_file_name(string fname, object who) * added foreach (, in ), which should behave the same as k = keys(m); for (i = 0; i < sizeof(k); k++) { x = k[i]; y = m[k[i]]; ... } * fixed a bug that gave odd error messages for illegal simulefun overrides * returned options.h to the MudOS distribution options * fixed crashers in terminal_colour() Fri May 5 03:25:54 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a4 * fixed some bad logic in rc.c that would sometimes write past the end of it's temporary buffer (rc.c needs a rewrite....) * fixed a Makefile bug that caused edit_source to try to include configure.h * added 'foreach ( in ) ' . currently only legal when is an array . foreach (x in y) { ... } should behave identically to for (i = 0; i < sizeof(y); i++) { x = y[i]; ... } with the exception that y is only evaluated once * fixed another crasher in people going linkdead in ed * added some output in edit_source.c related to local_options * fixed a bug in replace_string() that would miss occurences at the end of the string * fixed a typo in the alpha fix from last release * COMPAT_BUSTER: 'foreach' and 'in' are reserved words * COMPAT_BUSTER: map_mapping now passes the key and the value to the function * crasher fix in the contrib efun pluralize(); also corrects a bug that caused it to strip adjectives * fixed a few typos in smalloc.[ch] * added Symmetry's changes to testsuite's master and simul_efun obs Tue May 2 20:38:08 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a3 * fixed a bug that would ignore 'local_options' during compilation * fixed a bug in the handling of _OPTIONS_H_ * modified the OBJDIR rules not to recompile excessively * rewrote the error context handling, propagating Symmetry's error popping tricks everywhere, cleaning up the code, and removing some ancient code * fixed a bug in generate_source(string, ...) that produced an error message where there shouldn't be one * put ins_long() back in since 64 bit machines need it * fixed some incorrect calls to add_message in DO_MSTATS and TRACE_CODE * cleaned up user_parser; fixed some crashers * COMPAT_BUSTER: It is now illegal to any of the following from a verb action which return zero: . call remove_action() . destruct an object which defines commands . move an object which defines commands . move a living object * cleaned up the mudlib error handler code; fixed a leak therein * added ;'s in a few places in socket_efuns.c for strict ANSI compilation * optimized deallocate_string() in the same way free_string previously was * added Robocoder's patch to allow '\a' and '\e' (bell and escape) * fixed the stringified efuns to set the type of the return value to 'string' * fixed a crasher in clear_notify() * fixed a crasher in people going linkdead in ed * fixed a bug that would add an extra object on previous_object(-1) for lfun and functional pointers Tue May 2 19:34:55 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a2 * fixed a crasher when replace_string() was called on a string with more than one reference, and the replacement was smaller than the thing being replaced * fixed addr_server to compile again * fixed a crasher in string creation for the reworked efuns * added a case for the new F_WHILE_DEC code in the disassembler * slight optimization to replace_string :) * sizeof(class) now returns the number of members, not zero * fixed #undef OLD_ED compile * New contrib efuns: string *variables(object), object *heart_beats() Sun Apr 30 03:53:32 EDT 1995 (tim@handel.princeton.edu (Beek)) * created v21.4a1 from v21.3b1 * updated with respect to v21.3b4 * added Truilkan's optimized replace_string(): should be '15% to 40% faster' depending on the use. also modified it to work with counted strings, and slightly optimized the brute force (pattern length == 1) case * the logon() function is no longer required to exist * rearranged the output of the driver a bit, and cleaned up a lot of the related code. stdout and debug.log now both get the same information (with the exception of some stuff that only goes to stdout before debug.log is ready) * removed a lot of fidgeting with the value of command_giver COMPAT_BUSTER: the definition/existence of this_player() changed in some places. * COMPAT_BUSTER: A number of efuns now return strings instead of dumping info to this_player(): malloc_status(), cache_stats(), lpc_info(), mud_status(), dump_file_descriptors(), program_info(), debug_info(), dump_socket_status() * reorganized/rewrote varargs handling; default to the ANSI way if possible * function pointers can now be used for socket callbacks * New Feature: if you have a file 'local_options', it will be used instead of options.h. Also, edit_source will issue an error message if an option has been added to options.h that you don't have a setting for. --------------------------------------------------------------------------- (v21.3a7 promoted to v21.3b1) Tue Apr 25 15:43:47 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a7 * updated with respect to v21.2b8 * added Robocoder's optimization to read_buffer() * fixed a lot of things gcc -Wall complained about * fixed a crasher in disassembling code involving classes * fixed type checking to not give an error for missing type for arguments when type checking is off * fixed a bug which could cause type errors in non-type checked functions, especially wrt 'return x;' * fixed a problem that would cause edit_source -configure to run on every make * check return values and report file errors in edit_source -malloc * configure checks for , and if DEBUG is on (sgi prototypes for bzero, which is used by FD_ZERO is there) * only add -lmalloc if malloc() isn't in a standard library Tue Apr 25 15:25:06 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a6 * fixed misoptimizations of nullp() and undefinedp() * fixed a bug in array subtraction, intersection, and other operations (next person who uses & when they mean == will be shot) * fixed two typos in the build.MudOS script Sun Apr 23 18:53:24 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a5 * updated with respect to v21.2b7 * fixed a bug in the STRFUNCS check in ./build.MudOS * fixed some compilation problems with string functions and DEBUGMALLOC Sat Apr 22 21:38:11 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a4 * fixed some compilation problems with DEBUGMALLOC tags in function calls * fixed a typo in the T_REFED optimization that would cause the gamedriver to crash right after booting * fixed save/restore of classes * fixed reclaim_objects() to correctly handle destructed objects as mapping keys; the equivalent of map_delete() is now done on them * optimized free_string() with some ideas from Armand@TMI-2 Fri Apr 21 02:06:38 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a3 * updated with respect to v21.2b6 * optimized free_svalue() and assign_svalue_no_free() by handling all refed objects similarly and saving a switch() * fixed some compilation problems in interpret.c * fixed some of the tagged routines to depend on DEBUGMALLOC, not DEBUG * fixed the external declaration of svalue_strlen_size Tue Apr 11 12:23:36 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a2 * updated with respect to v21.2b5 * fixed a variable name clash (type_names) between interpret.c and compiler.c * edit_source -configure now checks for the existence of strerror() for better POSIX compatibility * fixed catch() to work from LPC->C code * if the compiler found is 'cc', check if it is gcc and if so use gcc's optimization flags * MAX_USERS no longer exists; instead, space is allocated as needed. a limit should probably be enforced by the mudlib to avoid running out of file descriptors ... * new efun alias: this_user() == this_player() * compile hash.o with optimization since it is used in the main driver as well as edit_source * added an optional flag to the functions() contrib efun: functions(object, 1) returns: ({ "function_name", num_arg, ret_type, arg1type, arg2type, ... }) where the types are the type numbers given by typeof() * COMPAT BUSTER: map_mapping now passes the value, not the key, to the function pointer. * evaluate() and apply() now return 'mixed' and don't need casting with CAST_CALL_OTHERS defined * rewrote malloc'ed strings to be ref counted and remember their lengths. This gives a factor of 2-5 speed gain on many string operations at the cost of 4 bytes of memory per string. However, the reference counts means that malloc'ed strings are not duplicated when copied, so despite the new overhead, many muds may see a reduction in memory used by strings. Note: If you are trying to test this, note that check_memory() and mud_status() now report ALL memory used by strings; previously only the memory used by shared strings was reported, the memory used by malloc'ed strings wasn't reported anywhere. * made strings statistics optional since they can have an impact on the speed of string operations. * driver guru info: where you used to do: now do: x = (char *)DXALLOC(n+1, ... x = new_string(n, "foo") FREE(x) FREE_MSTR(x) x = DREALLOC(x, ... x = extend_string(x, ... strlen(shared_string) SHARED_STRLEN(shared_string) note that string_copy() now returns a ref'd, counted string. if you really do just want a copy of an area as a normal allocated block, see alloc_cstring() Also, it isn't safe to assume you can write into a malloc'ed string now. See unlink_string_svalue() if you need to do it. * optimized explode() and implode() to use SVALUE_STRLEN to find the length of their arguments * removed some unused ed flags * added a new ed set option 'verbose' which shows number of lines and bytes in files, etc * added a check not to add -lcrypt if crypt() is defined in libc.a Tue Apr 11 00:36:00 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a1 * updated with respect to v21.2b3 * successfully compiled and ran the driver with all loaded objects compiled into the driver (LPC->C); the only things that may not work are catch() and defining functionals/expression pointers (although calling function pointers will work fine) * fixed a typo in the type checking code generated for to_float/to_int (LPC->C) * precompiled objects now depend upon binaries which are saved with the .B extension so they don't conflict with normal binaries * fixed in generation of the following LPC->C code: . while (i--) ... . for or while (x < y) ... * added support for (--x), (++x), void_assign_local, x--, (-x), (~x), x[C compiled code * generate_source() now sends precompiled objects into a mudlib/ subdir of the binaries dir if passed an array of files, and creates multiple source files there instead of one huge source file. The mudlib/ dir can be copied unchanged into the driver source dir and compiled. * removed support for ALWAYS_SAVE_COMPILED_BINARIES * made the output of lpc_info() more readable * F_WHILE_DEC now uses up one less byte * removed an unused version of find_status() * fixed a bug in sprintf's column option that would omit a character if a line was too wide ---------------------------------------------------------------------------- Thu Mar 30 15:45:30 EST 1995 * promoted to beta status (see v21.1b1) * updated with respect to v21 * Two new contrib efuns: . void store_variable(string name, mixed value) . mixed fetch_variable(string name) These can be used for simulating set(), implementing debuggers, etc: foo = bar <-> store_variable("foo", bar) return foo <-> return fetch_variable("foo") set(string foo, mixed bar) { switch (foo) { case "name": case "hp": store_variable(foo, bar); break; default: ... * fixed a number of typos/problems with the Makefile/GNUmakefile that would cause compilation to fail * Added an option to have up to 5 external ports These can be specified in the config file. The format is: external_port_x : kind # where x is 1, 2, 3, 4, 5; kind is telnet, binary, or ascii and # is the port number. For compatibility, the line: mud port : 5555 is the same as external_port_1 : telnet 5555 'telnet' ports act the same as previously. 'ascii' ports send no telnet characters, and don't do any interpretation of the text they receive except to pass it one line at a time to process_input(). 'binary' ports act very much like 'ascii' ports, except that buffers are passed to process_input() * Added in a fix from Robocoder for using smalloc or bsdmalloc with debugmalloc or wrappedmalloc; previous smalloc or bsdmalloc was erroneously ignored and sysmalloc used * Added in a fix from Jeearr for build.MudOS which would cause it to die if GNU make wasn't present * optimizations: return 0 is now 1 opcode loop conditions involving < multiple pushes in a row compressed into a quick format x == y, !(x != y), x < y, !(x >= y), x > y, !(x <= y), x != y, !(x == y) in if statements and ( ? : ) !x, x==0, etc in ( ? : ) * connect() is now passed the port # to which the user connected * reworked rc.c a bit * changed all the references to NO_UIDS to PACKAGE_UIDS; this was causing compilation to fail with NO_UIDS off * re-indented interpret.c * fixed compilation of functions(), replaceable() and pluralize() (contrib) * COMPAT_BUSTER: "efun", "new", and "asm" are no longer valid function/variable names * all type names are now valid in foo::bar Fri Mar 24 20:59:08 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a6 * updated with respect to v21.1b7 * The build procedure has changed drastically: (1) edit the top of build.MudOS to configure a few things. You should only have to do this if you have an obscure operating system or want to change INSTALL_DIR, etc (2) "./build.MudOS" The script will munge for a while, then print out the configuration it determines. (3) if you don't like what build.MudOS decided, edit the top of Makefile/GNUmakefile. (4) type make/gmake, as appropriate (5) type make install, or move the binary to whereever you want it * technical details: The build process goes more or less as follows: (1) ./build.MudOS determines enough system parameters to allow the compilation of edit_source (2) edit_source is built, then run to process options, configure malloc, create various makefiles and check which libraries and include files exist (3) Makefile.MudOS is then executed in order to build the main driver executable * stage (2) of the compilation is run with optimization off, as edit_source takes longer to compile than to run ... * Both GNUmakefiles and Makefiles are generated from a common file. developers should edit Makefile.master and then run 'make Makefiles' if changes to the build process are wanted. (This was actually added last pl, but now applies to 3 makefiles) * modified terminal_type negotiation to comply with the relevant RFC's; this may increase the number of systems it works with. * added NAWS window size automatic negotiation; the callback is: void window_size(int width, int height) * optimized the pushing of call_out arguments * added a missing prototype for c_generate_node() * fixed/kludged errors in #include to report the right line number * renamed DISALLOW_BUFFER_TYPE to NO_BUFFER_TYPE Wed Mar 22 23:37:55 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a5 * added a mudlib/ directory to hold LPC->C compiled code * mudlib/ and packages/ compilation now use libaries to avoid packages/*.c kludges and the like * added Symmetry's diffs to allow for recursive class definitions, allowing linked lists, etc to be constructed * packages are now specified in options.h instead of fooling with func_spec.c. This will work for any package, even ones not included with MudOS (PACKAGE_AURORA, for example, will automatically compile and use packages/aurora.c and packages/aurora.spec) in addition, a #include in func_spec is no longer necessary * removed all references to the MIRE package * in the driver source: NO_MUDLIB_STATS -> !PACKAGE_MUDLIB_STATS SOCKET_EFUNS -> PACKAGE_SOCKETS * Fixed a number of instances where messages including filenames had no leading '/' * added F_VOID_ASSIGN_LOCAL: x = ... is now a single opcode * applied Robocoder's fix for a problem where 'continue' would get confused in nested loops * removed some useless code from F_VOID_ASSIGN * removed make_malloc and make_func and replaced them with edit_source; cleaned up the associated code * added preprocess.c which centralizes some of the code used by both lex.c and edit_source.c; more work needed here. Unfortunately, it has to be #included since edit_source.c can't stand MALLOC * COMPAT_BUSTER: removed a bunch of LPC predefines SAVE_EXTENSION: use __SAVE_EXTENSION__ USE_EUID: use ! __NO_UIDS__ HAS_BUFFER_TYPE: use ! __DISALLOW_BUFFER_TYPE__ HAS_SOCKETS: use __PACKAGE_SOCKETS__ HAS_SHADOWS: use ! __NO_SHADOWS__ HAS_DEBUGMALLOC: use __DEBUGMALLOC__ && __DEBUGMALLOC_EXTENSIONS__ HAS_MATH: use __PACKAGE_MATH__ HAS_PROFILE_FUNCTIONS: use __PROFILE_FUNCTIONS__ HAS_MATRIX: use __PACKAGE_MATRIX__ HAS_PRIVS: use __PRIVS__ HAS_EACH: use __EACH__ HAS_CACHE_STATS: use __CACHE_STATS__ HAS_OPCPROF: use __OPCPROF__ HAS_MUDLIB_ERROR_HANDER: use __MUDLIB_ERROR_HANDLER HAS_MUDLIB_STATS:use ! __NO_MUDLIB_STATS__ HAS_LIGHT: use ! __NO_LIGHT__ * removed the debugging code from the identifier hash table code since it appears to be bug free * fixed a crasher in Robocoder's config file fix when lines were missing from the config file * consolidated some of the error reporting code * both GNUmakefile and Makefile are now generated from Makefile.master via GNUmakefile.pre and Makefile.pre; one side effect of this is that you can use 'make Makefiles' to return your Makefile to it's unedited state * fixed a crasher in objects dested from some socket callbacks Sun Mar 19 02:32:56 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a4 * updated with respect to v21.1b6 * REALLY added in the diffs from v21.1b5 (I forgot to run patch last patchlevel) Sun Mar 19 02:32:56 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a3 * updated with respect to v21.1b5 Sat Mar 4 16:14:17 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a2 * updated with respect to v21.1b4 * fixed compilation with #undef OLD_ED (object_ed_output() changed to global scope; it's used by regexp_error()) * fixed a bug that would incorrectly claim filenames had // in them on some operating systems * changed the above error message to say what the filename was :) * COMPAT_BUSTER: privs_file is now called to get new privs for virtual objects which are loaded. This is a bit of an oddity; virtual objects actually get created twice, so it's hard to say what should be done when. Possibly, mudlib_stats should be also be reinitialized. Currently, they behave the same way as the object returned from compile_file() which is inconsistent with their filename (which was the old behavior of PRIVS as well) The same problem exists with UIDS. This may change in the future. Sat Mar 4 16:14:17 EST 1995 (tim@handel.princeton.edu (Beek)) * v21.2a1 created from v21.1b3 * added code to not generate unreachable code in LPC->C generation since SGI cc is very noisy about that and it happens a lot. * protect special characters string constant case labels with '\' when generating switch tables (LPC->C) * fixed a cases for int switches to use the correct field (LPC->C) * added more name mangling for switch table names so they don't collide (LPC->C) ---------------------------------------------------------------------------- Wed Mar 1 18:14:01 EST 1995 (tim@handel.princeton.edu (Beek)) * v21.1a5 promoted to beta status (see v21.1b1) Fri Feb 24 23:48:38 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a5 * brought up to date with respect to v21b15 * MASSIVE source cleanup . 'arrays' are always refered to as arrays and never vectors/pointers . all types now use foo_t syntax instead of struct foo . several header files cleaned up and includes reorganized . removed internal distinction between internal and external programs (i.e. foo->p.i.bar is now foo->bar) * centralized the processing of "/foo/bar.c" -> "foo/bar" * removed support for RUNTIME_LOADING * removed support for #undef NEW_FUNCTIONS * in addition to the above, call_other pointers are gone. (: x, y :) should be converted to (: call_other, x, y :) the functionality remains unchanged, since that's all they really did ... * function pointers reorganized to use less memory (the size is now variable based on the ammount of space needed, so a lfun pointer can be significantly smaller) * added OPCPROF_2D which keeps statistics on the most commonly executed *pairs* of instructions * regexp errors in regexp efuns now use error(), instead of printing a message to this_player() which eroneously refers to ed ... * LPC_TO_C now works for compiling objects into the driver. (1) make sure #pragma save_binary is on in all objects to be compiled (2) do a generate_source( ) (3) copy /binaries/interface.c into your source dir (replacing the provided one) (4) recompile the driver (5) the lpc_info() efun can be used to see if the new programs are being used; other than that there should be no visible difference, other than speed. Wed Feb 15 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a4 * brought up to date with respect to v21b10 * optimized the handling of the redefinable keywords 'efun', 'asm', and 'new' * Floats and ints are now automatically interconverted in the following cases: . Passing an int to a efun that takes a float and not an int, and vice versa. Hence, sqrt(5) is legal. . during initialization (as in float x = 5) . Note: the above depends on compile time checks so if you exploit mixed, etc to put an int in a float variable it will misbehave * added limited support for classes (no member functions): . structure definitions are stored in programs, which means they can be passed down via inheritance . definition of the type is as follows: class { ; ... } Ex: class my_first_class { int my_number; string my_string; } . declaring a variable of that type: class ; Ex: class my_first_class my_var; . instantiating a class: = new(class ); Ex: my_var = new(class my_first_class); . assigning to/using a member -> = whatever ... Ex: my_var->my_string = "It worked!"; Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a3 * brought up to date with respect to v21b8 * fixed the define used by cfuns.h to be different from the one ccode.h used * generate_source() now returns zero if there were compilation errors * modified lower_case() to be slightly more portable and easier to read * inlined sapply() into apply() and apply_master_ob() by hand * fixed a unrecognized #pragma crasher (the list wasn't terminated) * fiddled with the default settings of options.h * new contrib efuns: string pluralize(string) int file_length(string) string upper_case(string) Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a2 * brought up to date with respect to v21b7 * added prototypes for all the c_* functions in ccode.c * fixed the Makefile and GNUmakefile; removed obsolete files * fixed generate_source() to use 'package fname;' instead of 'package lpc_to_c;' when outputting to 'fname.c' and 'fname.spec' * removed support for add_action(string); all it did was cause errors anyway ... Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a1 * brought up to date with respect to v21b5 * COMPAT_BUSTER: removed the following options.h defines and related behavior: OLD_HEARTBEAT, OLD_COMMAND, IGNORE_STRICT_PRAGMA * COMPAT_BUSTER: STRICT_TYPE_CHECKING removed, use PRAGMA_STRICT_TYPES as a default pragma * COMPAT_BUSTER: ALWAYS_SAVE_BINARIES removed, use PRAGMA_SAVE_BINARY as a default pragma * COMPAT_BUSTER: move_object only takes 1 argument. change move_object(this_object(), foo) to move_object(foo) * LPC->C restored to working condition in a limited sense: . new pragma #pragma efun ignored during regular compiling . generate_source("source_file.c", "destination_file.c") will compile "source_file.c" into an efun package made up of "destination_file.c" and "destination_file.spec" which can be linked into the driver . note that it is illegal to do the following in an efun: - call a local function -> this really can't be done - call a simul_efun -> see above. Use efun:: to get around write simul_efuns, etc; the driver won't complain about illegal overrides while generating efun source - use a global variable -> wait for future fixes . LPC->C for objects doesn't work as of this release; only creation of efuns in packages (useful for efunizing simuls) . various things not supported yet; most notably functionals, also string switches are supported but buggy; let me know if you have other problems (esp. linking errors) * added some internal stuff for structures; work in progress. ignore the 1 shift/reduce conflict as it won't affect normal LPC code. * define_new_function() doesn't take the offset any more; this is set explicitly where needed (2 places) * argument types are actually saved why #pragma save_types is used. They still aren't used yet tho. * the format of switch parse trees was tweaked a bit to help LPC->C compilation * removed some unused i_generate_* functions * push_indexed_lvalue in interpret.c is no longer static; compiled C code needs it * removed call_absolute() * removed optimization flag, as it was unused * rewrote pragma handling to work off of a table for easier addition of pragmas * added #pragma no_whatever which turns off the effect of #pragma whatever * added program argument types to md.c's list of permanent blocks; not checked for leakage yet tho Thu Oct 2 01:29:26 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a14 * fix for crasher when using a stale reference [reported by Tigran, fix by Cloud] * added implementation for filter(string, ...) Thu Sep 25 00:22:45 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a13 * updated with respect to v22.1b14 * improved warnings for code with no side effects * changed optimizations for casted string constants to obey their new type (just for consistency) * resolve() can now take a function pointer as the second arg Wed Sep 10 01:14:10 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a12 * added a Perl script compat/fixstatic that does a pretty good job of converting static to nomask/protected Fri Sep 5 01:01:54 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a11 * fixed ASCII external ports * implemented MUD mode external ports (use "MUD" in the config file; the mixed value gets passed to process_input) * Parsing package changes: . parse_sentence has an optional 3rd and 4th arg. . The 3rd arg an array of objects to use in the parse instead of the inventory of the environment of the user. Nested arrays indicate containment, i.e. ({ ob1, ({ object inside ob1 }), ob2, ob3, ({ first ob in ob3, second ob in ob3 }), ... }) . The 4th argument is a mapping of string -> object which can be used to supply nicknames and similar things. For this parse, the 'object' acts as if 'string' were returned by pc_id_list(). Entries that do not correspond to objects involved in the current parse are ignored. . fixed crashes in calling parse_refresh() from within a parser callback. This is now the correct way to say "I'm returning this answer, but ask again next time too" Wed Sep 3 13:30:07 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a10 * updated with respect to v22.1b12 * added missing 'return ret' in dump_socket_status() compat simul * added parser packages fixes from Belgarat: . new error: ERR_MANY_PATHS returned when the number of possibilities needed to figure out the meaning of a sentence exceeds a certain number (i.e. figuring out certain highly ambiguous sentences isn't worth the CPU) . PARSE_DEBUG can be used to get parser debugging without compiling with DEBUG on . evil new :c modifier that means just choose the first one you find, for MUDs that want to make a mistake they will regret for the rest of their lives, and be hated by their players [nah, the maintainer would _never_ insert personal opinions into the ChangeLog] . "finally, two-object rules are examined more thoroughly and some strange parse errors are eliminated. Changed semantic for applies: direct_ and indirect_ applies can be called with 0s as the object-type arguments. However it's now guaranteed that they will be called with filled object arguments at least once during the processing of a rule. This allows objects to do explicit checks. The direct_ and indirect_ applies should work as usual when they receive 0 as object argument - they simply should return if the object can or can not participate in the rule. When the arguments are filled, the direct_/indirect_ applies can perform thorough checks and return errors." Sat Aug 30 19:23:35 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a9 * updated with respect to v22.1b11 * fixed typo in '\\' handling in #defines; also added overflow check * removed unused local in interpret.c * added a #breakpoint preprocessor directive which calls lex_breakpoint(), which does nothing. Useful for setting debugger breakpoints that stop at a particular point in LPC compilation Wed Jul 23 18:30:27 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a8 * added lex.c fixes from Burty: . Handle '\\' correctly in defines . preserve whitespace when expanding defines . added quote checks in expand_all_defines() Thu May 15 14:14:42 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a7 * reformatted the trace information with MUDLIB_ERROR_HANDLER off; should be a bit easier to read now. Wed Apr 16 07:54:45 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a6 * updated with respect to v22.1b8 * object_present() now depends on #ifdef F_PRESENT instead of NO_ENVIRONMENT so it disappears in the !NO_ENVIRONMENT && !F_PRESENT case too. [idea from Jihad] * name change: the file "Install" is now "INSTALL" to make it slightly more visible * fixed file.h to check file_incl.h for S_IS* first [fix from Leto] * fixed the multiple class inherit code to work [fix from Wodan@Discworld] Sun Apr 13 23:59:02 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a5 * updated with respect to v22.1b7 * fixed compilation with DEBUGMALLOC off * (: efun::foo :) is now a valid efun pointer (assuming master()::valid_override() doesn't complain) Sat Apr 12 15:06:30 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a4 * updated with respect to v22.1b6 * reclaim_objects() now cleans destructed this_player's and objects out of the call_out() list * commenting out input_to() or get_char() in func_spec.c now removes all related code and variables Sun Apr 6 18:00:43 EDT 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a3 * updated with respect to v22.1b5 * classes can now be inherited multiple times, as long as the definitions are consistent. * fixed macro expansion to expand all arguments to macros immediately. in particular, the ANSI stringize hack: #define S(x) #x #define STRINGIZE(x) S(x) now works. E.g. after #define FOO bar, STRINGIZE(FOO) gives "bar" and not "FOO" Wed Apr 2 15:11:10 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a2 * updated with respect to v22.1b4 * specifying both left and center justification in sprintf() now pushes odd-length strings to the left instead of the right, e.g. sprintf("%|8s", "foo") == " foo " sprintf("%|-8s", "foo") == " foo " * fixed crasher in calling socket_status() for a socket owned by a destructed object [reported by Jihad] Tue Apr 1 13:59:43 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.2a1 * added a slightly improved version of Tim's socket_status() efun. Usage: socket_status(int fd) returns an array with: . ret[0] = (int) fd . ret[1] = (string) state . ret[2] = (string) mode . ret[3] = (string) local address . ret[4] = (string) remote address . ret[5] = (object) owner socket_status() returns an array of arrays; one for each socket. * COMPAT_BUSTER: dump_socket_status() is gone; see compat/simuls for a replacement [written using socket_status] * socket status information is now cleared when the socket is closed * fixed a bug that caused the close callback not to be called for sockets that went through the CLOSING state ---------------------------------------------------------------------------- (v22.1a17 promoted to v22.1b1) Wed Jan 29 19:15:44 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a17 * updated with respect to v22b27 * fixed origin() to not return "call_out" for ORIGIN_INTERNAL [reported by Jihad] * added Marius' patch to make the parsing package work with NO_ENVIRONMENT. Requires the following new master applies: . parse_get_first_inventory(object ob) { must behave like first_inventory(ob) } . parse_get_next_inventory(object parent, object current) { must behave like next_inventory(current); parent == environment(current) in case you need it } . parse_get_environment(object ob) { must behave like environment(ob) } [I'm not in love with this interface, but it will do for now] * fixed a number of warnings Sat Jan 25 18:14:00 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a16 * wrapped debug.c in #ifdef DEBUG_MACRO * fixed crasher in file operations very early in the boot process (before the master object loads); evidentally some libs actually do this [both reported by Aragorn] Thu Jan 9 20:20:40 EST 1997 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a15 * updated with respect to v22b26 * added Raistlin@IE's patches to make the Win32 build procedure much cleaner and not depend on so many GNU utilities; also did a wonderful job of cleaning up the OS specific Win32 code. Fixes a number of bugs, as well. [ also, I can't test these, since I still don't have a Win32 compiler, so I'd appreciate it if someone would let me know if I messed something up ] * fixed crasher in explode("foofoo", "foo") with SANE_EXPLODE_STRING on and REVERSIBLE_EXPLODE_STRING off * enhanced DEBUG_MACRO a bit; things are now in terms of identifiers instead of impossible to remember numbers. To add a new one, add the define to debug.h and the entry near the top of debug.c Then do: debug(mylevel, (...)) new efuns: . set_debug_level("mylevel") . clear_debug_level("mylevel") . debug_levels() [returns a mapping showing which messages are enabled] * A few changes to call_out: . 0 delay call_outs are legal . call_outs to the same time are in the order they are set up, not in reverse order . call_outs() from w/in call_outs() are relative to the time the call_out was scheduled to go off, not the actual time; this is because: . the current time is slowly advanced as call_outs are executed until the current time reaches the real time, instead of taking a huge leap forward (in the event that the MUD is busy enough that it is getting behind) Mon Dec 30 04:08:08 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a14 * fixed compilation with UIDS enabled [reported by Leto] * added support for: . allocate(int n, mixed v): allocates an array of n elements. The i-th element is set to evaluate(v, i) [i is in the range 0..n-1] . allocate_mapping(array keys, mixed v): - if v is an array, the returned array has keys 'keys' and values 'v' (like 3.2.x's mkmapping) - if it is a function, the the mapping has keys 'keys' and values evaluate(v, key) - otherwise, each key has the value 'v' Mon Dec 9 13:27:42 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a13 * updated with respect to v22b25 * fixed a bug introduced recently which caused random() to always return zero when drand48() was being used [reported by Leto] * changed restore_object() to ignore ^M's at the end of lines in save files * added leading / to get_save_file_name() argument [reported by Leto] * fixed ARCH define for Linux/alpha * fixed some implicitly defined functions which cause warnings on the alpha * fixed crasher/wild pointer write in code like: foreach (string s, ref r in m) { map_delete(m, s); r = 0; } Sun Dec 8 23:50:32 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a12 * fixed a bug that would cause implicitly defined functions (ones with no prototype in scope allowed by strict types being off) to become invisible when inherited [reported and tracked by Aragorn; also reported to affect NM muds on alpha drivers] Fri Nov 8 12:03:53 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a11 * updated with respect to v22b24 * changed function pointers whose owners are destructed to be ignored by call_out_list() and to not error when they fire. Changed so that "foo" and (: foo :) have the same/similar behavior. This isn't strictly an equivalent case, since (theoretically) the function could be owned by a different object than the one that did the call_out(), but that is probably restricted to code doing call_out()s on behalf of other objects anyway, and the runtime error is more annoying than useful. [Suggested by Mordred@RoD] * to_int() now returns undefined if no valid characters were converted. * leading slash added to in_edit() [reported by Mystic] * call srand48() if using drand48() to make random numbers [fix from Turrican@DW] * fixed compilation with NO_ADD_ACTION off or OLD_ED on, or NO_BUFFER_TYPE on * fixed the order of .o files for RUNTIME_LOADING * fixed switch() when two cases differ by more than 2^31 * better local_options error message Sat Nov 2 18:00:04 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a10 * use -m486 for pentium too * added /'s in non mudlib error_handler traces * fixed compilation with SUPPRESS_ARGUMENT_WARNINGS off * receive() can now take a buffer as its argument (useful for PORT_BINARY connections) * fixed PROFILE_FUNCTIONS not to miss calls which miss the apply_low cache * fixed the driver not to loop if more than one -D option is passed on the command line * the debug.log file is no longer opened and closed every time it needs to be written to; it is held open instead * made the DEBUGMALLOC hash a bit more efficient * fixed a bug that caused terminal_colour() not to strip spaces of the starts of all lines, instead of just continuations of wrapped lines * parser callbacks went back to being ORIGIN_DRIVER, since they are restricted to the 'can_', 'do_' and 'indirect_' namespaces * various fixes to compilation with uids enabled * add to the errors field of mudlib stats, even if a mudlib error handler exists * added parser support for 'a', 'any', 'my' Tue Oct 29 20:41:26 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a9 * updated with respect to v22b21 * fixed possible crashers in code like 'call_out(something, 1, ref x)' * fixed wild pointer into stack in code like: mixed global; void foo(mixed args...) { global = args; } void create() { int x; foo(ref x); } void inc(int ref x) { x++; } void increment_random_location_on_stack() { inc(global...); } * fixed the 'multiple access modifiers' warning not to consider nomask and nosave to be access modifiers * disabled the multiple access modifier error message with SENSIBLE_MODIFIERS off * fix for compiling with COMPRESS_FUNCTION_TABLES off from Mystic * fixed compilation with FD6 code disabled * fixed various crashers in the unused locals warnings * various changes to func_spec.c so that built in efuns can be disabled or renamed (e.g. remove or rename clone_object(), etc) [idea from Mystic] * added support for foreach (ref x in array), foreach (x, ref y in mapping) * better error message for indexing an illegal type using a range * enabled the 'public' keyword with SENSIBLE_MODIFIERS on; it was accidentally disabled. Also fixed the options.h entry to be clearer * added a SUPPRESS_ARGUMENT_WARNINGS option, to cut down on the number of warnings generated by code which existed before omitting the argument name was legal * fixed terminal_colour() to treat multiple spaces as one space when wrapping [reported by Jihad] * fix for errors writing to flushing sockets Mon Oct 28 17:14:29 EST 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a8 * COMPAT_BUSTER: ORIGIN_CALL_OUT is now ORIGIN_INTERNAL; in addition most driver callbacks which do not use hard coded function names also use ORIGIN_INTERNAL (add_action, socket callbacks, etc). The practical fallout of this is that such routines may be static, but *not* private. * Use fd #6 instead of fd #3, since Solaris uses fd #3 while starting the program [reported by Aragorn] * fixed crasher in the parsing package generating the object list [fix from Aragorn] * It is now legal to use a class member of something of type mixed, as long as it is unambigous (e.g. foo->x is ok as long as only one class in scope has a member named 'x', or if 'x' is in the same position in all classes in scope) * Unused local variables now generate warnings * function arguments no longer need to have names (and not naming them inhibits 'unused' warnings) * more than one access specifier (e.g. 'public private protected') generates a warning * If SENSIBLE_MODIFIERS is defined, then: (1) 'static' no longer exists, and is replaced by 'nosave' and 'protected' (2) 'public' no longer means what it used to; it now means the default visibility * COMPAT_BUSTER: modifiers from a ':' declaration only affect declarations which have no modifiers of their own. I.e. 'private: nomask x;' no longer declares x to be private * if VIRTUAL_RESERVED_WORD is defined, then 'virtual' is a reserved word. Doesn't do anything, though. * if REF_RESERVED_WORD is defined, the 'ref' can be used to declare arguments to functions to be by reference instead of by value. example: int foo(int ref i) { i++; } void create() { int y = 1; foo(ref y); write(y); } prints '2'. Note that ref is required both in the declaration and the call. * fixed a bug that would cause compile errors when indexing something of type 'mixed' * added an 'efun_defined' pseudo function to the preprocessor. It works just like 'defined', except that it looks up efuns. Example: #if !efun_defined(snoop) write("snoop efun not available.\n"); #endif Mon Oct 21 17:48:12 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a7 * updated with respect to v22b20 * added Burty@Nanvaent's fixes for stringizing and macro expansion * added support for array &= and |= [idea from Avenger@CoreDump] * added the object name to the "Saving successful match" parser debugging message [idea from Aragorn] * added Leto's SERVER_IP patch * abort compilation after getting 5 errors, since we don't print any more anyway, and the leaks this was supposed to prevent were fixed years ago * MudOS now checks if file descriptor #3 is a valid socket when it starts up; if it is, it is used as a login port. * added a 'portbind' program: syntax: portbind [-p port#] [-d drivername] [-u uid] [-g gid] [args ...] All it does it bind the specified port, then execv() the driver, passing the bound port as file descriptor #3 (see above). drivername defaults to ./driver, and port# defaults to 23. if uid or gid is specified, setuid() and setgid() are called before exec'ing the driver. This means one can bind the telnet port by making portbind setuid, and using: portbind -u -g config.mud to run the driver Wed Oct 9 15:26:37 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a6 * updated with respect to v22b19 * fixed compilation with NO_ADD_ACTION off, PRIVS on, or PROFILE_FUNCTIONS on [re: the 'ob' global recently removed; reported by Aragorn, Jihad, Avenger, etc] * only do promotions (int)<->(float) on assignment, not op=; in the second case the conversion will be done by the efun (if legal) so there is no need. Mon Oct 7 16:43:45 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a5 * hidden checks are now compiled out if set_hide() is disabled in func_spec.c [idea from Avenger@CD] * buffer code is compiled out if NO_BUFFER_TYPE is defined; also fixed a few old references to DISABLE_BUFFER_TYPE. [idea from Avenger@CD] Also, a binary port in the config file will cause a sensible error message, and attempting to create a binary socket will return EEMODENOTSUPP. * removed the 'ob' global in efuns_main.c and related hacks with respect to object_visible(); also fixes a bug in the return value of environment() when it is hidden (and probably other bugs elsewhere too) [reported by Jihad] * fixed crasher in using the name of a file that doesn't exist as the object in an efun callback (e.g. filter(({}), "foo", "bar")) * fixed a couple compile problems and a crasher in PACKAGE_MUDLIB_STATS [reported by Avenger@CD] Thu Oct 3 18:16:53 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a4 * updated with respect to v22b17 * need to include "master.h" in the uid package now [fix from Leto], mas well as md.c, and master.c needs comm.h when tracing is enabled * fixed Makefiles on non-GNUmake systems to include the two new files introduced last pl * fixed crasher in the handling of refreshing the master object; also the literals are cached but are *not* affected by parse_refresh(). The reasoning is that if they change, it would cause all hell to break loose with existing rules. So parse_refresh() only needs to be called when the return value of parse_command_users() changes. Tue Oct 1 19:14:42 EDT 1996 (tim@wfn-shop.princeton.edu (Beek)) * raised patchlevel to v22.1a3 * updated with respect to v22b16 * fixed various crashers in the new snoop code [reported by Jihad] * Many thanks to DrFeelgood for helping clean up header file dependencies, and pointing out typos in options.h * Warning for using both a 'port number : ' line and an 'external_port_1 : ' line * moved master object and function pointer handling to their own files Mon Sep 30 18:56:54 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22.1a2 * updated with respect to v22b15 * #'foo is now the same as (: foo :) when COMPAT_32 is defined [suggested by Bubbs] * added NO_SNOOP option * The requirement that a snooper must be interactive has been lifted (though this isn't particularly useful unless RECIEVE_SNOOP is also defined) [suggested by Larnen] Tue Jun 4 00:57:30 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22.1a1 * COMPAT_BUSTER: #include <...> now no longer searches based on relative paths; #include "..." still does. * added Blackheart's diffs for using gdbm. See PACKAGE_GDBM for details; probably this should be merged with Descartes' PACKAGE_DB stuff ... * added Avenger@CD's diffs for a union array operator (|) (with trivial changes and a array stat fix) Works analogously to &: ({ 1, 2, 3 }) & ({ 2, 4 }) = ({ 2 }) ({ 1, 2, 3 }) | ({ 2, 4 }) = ({ 1, 2, 3, 4 }) * if ARRAY_RESERVED_WORD is defined, use "array" instead of "*" in error messages [e.g. "Bad assignment ( mapping vs array )"] * added Marius@Prilnari's fixes to lex.c: token pasting in preprocessor macro expansion and adds token quoting * added the -c option to the RUNTIME_LOADING compile flags since it disappeared somehow * Hidden object fixes for present() and environment() * COMPAT_BUSTER: removed the tail() efun; a simul_efun is in the compat dir * added leading / to log_error() filenames * cleaned up a bunch of duplicated code in array.c, and corrected a few statistic bugs * Parser package changes: . added the object name to some parser debugging messages . moved names of the applies to top of parser.c as #defines . information from the master object is now cached (parse_command_users, parse_command_prepos_list) COMPAT_BUSTER: this means parse_refresh() must be called if the information changes . livings_are_remote() is now rechecked when a parse_refresh() is done ---------------------------------------------------------------------------- (v22a41 promoted to v22b1) Mon May 27 16:20:09 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a41 * variable information is now stored only in the program in which the variable is defined; estimated compression ratio is about 10:1. YMMV * COMPAT_BUSTER: all inherits must now precede all global variable definitions * Added Ceda@IdeaExchange's fixes to the Windows '95 port * fixed compilation error in c_prepare_catch() * added a COMPRESS_FUNCTION_TABLES option, which compresses function tables even further (estimated compression: 2-3x) at the cost of slowing down function calls slightly (<5-10%) * Fixed error() to correctly added a trailing \n to error messages that are missing them * Crasher fix in mapping composition (from Avenger@CoreDump) Sun May 26 00:37:08 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a40 * internal function aliases are handled a little smarter, anticipating more function table memory optimizations later * fixed some crashers/problems involving #pragma optimize and some compiler errors * fixed a crasher in passing a filename that wasn't a string constant to dump_prog() * program_info() can now take an object as a first arg * fixed a problem that would cause functions that were prototyped before inherited to call the first function defined in the object instead. Fri May 24 00:30:10 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a39 * terminal_colour() now has two more optional args; the 3rd is the width to wrap at, and the 4th is the indent for lines after the first * Fixed a crasher in some Too deep recursion errors * Fixed crashers in constructs like while (...){ e = catch { break; } } Jumping out of a catch block is now illegal. * Fixed a crasher in program_info() when there are objects without type information loaded Thu May 23 15:46:10 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a38 * YYTYPE's size changed from 10 to 8, which should make the compiler slightly more efficient. * Fixed a bug in the generation of information to pass to mudlib error handlers, which would cause an "Illegal array size" error to be flagged before the error handler was even called. * A few changes to $() notation: . $() now moves out one level, not all the way out. So, to use a local variable in a function from inside a doubly nested function pointer, one needs to use $($()), e.g.: string x; function f = (: (: $($(x)) :) :); . Due to the above change, constructs like $($1) are now legal, and work as one might expect, e.g.: function f = (: (: write($($1)) :) :); // The inner function // function pointer writes whatever is passed // as the first arg of the outer one function g = evaluate(f, "hi"); // creates a function pointer that // writes "hi" . this isn't really that complex; just remeber the rule "Each $() temporarily removes one level of (: :) nesting." Familiarity with functional programming is also recomended; (: (: :) :) constructs are function pointers that create and return function pointers when evaluated, _not_ simply composite functions. . there is now a limit to function pointer nesting; the default is 10. (Anyone who needs more is sick, but I thought I'd mention it) . this also fixes a few crashers in using $() inside doubly nested function pointers Mon May 13 23:16:05 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a37 * Fixed a crasher in redefined functions * added a STRIP_BEFORE_PROCESS_INPUT option for NO_ANSI * fixed call_out() to pass zero args if zero args were specified, instead of always passing a first arg of 0. (Usually, you'd never notice, but it makes a difference when scheduling call_outs to efun pointers to efuns which take no arguments) * COMPAT_BUSTER: call_out_info() elements now have only 3 elements, not 4; this is due to argument handling restructuring, as well as mild security concerns for reference types. Maybe an option will be added to get the arguments at a latter date if it is desired. * minor tweaks to the cleanup rules in the makefiles to get rid of a few irrelevant files in the diffs * added Maarten de Jong's documentation on compiling MudOS on an Amiga using gcc as amiga/README-gcc. * Changed ED_MAXLINE from 512 to 2048 * Warning for using | or & when both arguments are "boolean" values (e.g. the result of !, ==, !=, <, etc) Mon May 13 00:29:11 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a36 * Fixed a crasher in memory_summary() when some objects are swapped. * Fixed a crasher in check_memory() when BINARIES was #undef'd * '\"' -> '"' in rc.c, since the former confuses emacs's hilit19 mode * Better fix for the undefined function problem; the old solution occasionally didn't work on some systems * Fixed a problem with aliases in the function table that would sometimes cause ... args not to be handled right * Fixed a crasher involving prototypes preceding inherit statements * program_info() now calculates the overhead of save_types as well Sat May 11 20:28:19 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a35 * Reversed the function table search order in the new call_other search code to be consistent with overload search order * fixed a crasher in generated error messages for OBS rules which have an indirect object * added some entries to the files Bugs and Ideas * load_binary() now sorts the function table so it is in the correct order again since the order of shared strings is different from when it was saved * fixed a bug in the apply_low cache code which was accidentally using 'prog', a global, with disastrous consequences when valid_save_binary was called during the tail end of compilation. 'prog' is no longer a global, and is returned where needed. * fixed a bug which caused the identifier hash table to become trashed when a function was used before it was defined * 'make clean' now removes the testsuite's compile error log too Fri May 10 22:21:39 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a34 * moved strput() from the parsing package to the main distribution so it can be used internally * Changed the building of compiler error messages to use strput(), avoiding possible buffer overruns. Normalized the max length of most compiler error messages to 256 bytes. * Fixed compilation of PROFILE_FUNCTIONS * Fixed a bug introduced last pl that caused the call_other cache to malfunction * Fixed octal escapes in strings; they were getting omitted * Fixed a crasher in unterminated @ blocks (which, by the way, had absolutely nothing to do with /V\\age) Tue May 7 14:23:45 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a33 * moved the call to save the ed buffer of a user to before the call to net_dead() * Rewrote most of the function table handling code. Memory overhead is now 15 bytes per function defined and 5 bytes per function inherited, instead of 14 bytes per function inherited or defined This cuts function table memory usage about in half on a stock Lima lib. YMMV. Large open MUDs may see larger decreases; the program_info() efun is a good way to check. * Removed the last traces of OLD_PREVIOUS_OBJECT_BEHAVIOR * The inheritance warning is now a bit clearer, e.g.: foo() inherited from both /std/foo.c (via /std/bar.c) and /std/bazz.c; using the definition in /std/foo.c * Fixed the parsing package to not crash on reference to 'me' when 'me' isn't within sight (admittedly, an odd situation :-) ) * Fixed the testsuite to realize call_stack(3) now returns strings * Tables of defined functions are now sorted, so they can be binary searched; call_other time is now approximately O(m log n) instead of O(m n) when the cache is missed (m = # of inherits, n = # of functions in each) * Removed OPTIMIZE_FUNCTION_TABLE_SEARCH: the new search method is just as fast with no overhead * added Raistlin's patch for a parser bug that would cause the verb name to get inserted at the start of the 'real names' section of parser callbacks Mon May 6 21:47:59 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a32 * Small optimization to arrange_call_inherited() * Small cleanup to C function pointer handling in dumpstat.c * fixed a bug that caused dumpstat.c to ignore the size of array headers * Fixed the check_memory(1) table to be formatted nicer * removed outdated code from program_info(); also fixed a bug that caused the header size to be an absurd value * fixed a crasher in function_owner() [ref count bug] * added a memory_summary() contrib efun, which returns a mapping of with entries: map["program name"]["variable name"] Each entry contains the number of bytes used by that variable in all active instances of that program. The size of shared structures is divided up evenly between all values that reference it. * Made the parser end of buffer checks a bit easier to maintain * added parse_remove(string verb) which removes all rules for the verb 'verb' which were added by this_object() Mon May 6 14:23:47 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a31 * Added a FLUSH_OUTPUT_IMMEDIATELY option, which disables buffering of output. Useful for debugging. * Parsing package fixes: . Fixed a bug that caused OBS rules to silently do nothing if all the possible matches return errors beginning with '#' . COMPAT_BUSTER: Now, zeros are passed for args that aren't available yet (i.e. the indirect object in direct_foo_obj_bar_obj()). Also, the arg which is currently being worked on is now passed again (i.e. the direct object in direct_foo_obj_bar_obj()) Summary: "foo sword bar wiggle" would call: . can_foo_obj_bar_obj(0, 0, "sword", "wiggle") . direct_foo_obj_bar_obj(OBJ(sword), 0, "sword", "wiggle") . indirect_foo_obj_bar_obj(OBJ(sword), OBJ(wiggle), "sword", "wiggle") among other things . Fixed a number of bugs and buglets in disambiguating parses and generating error messages, especially in cases where all of the attempts produce nonsense Sun May 5 14:52:20 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a30 * added NAME_TRUE_VARARGS flag to disassembly listings * propagate NAME_TRUE_VARARGS up the inheritance tree to avoid incorrect argument type errors when #pragma save_types is in use * Parsing package fixes: . made the maximum tokens per parser rule configurable at the top of the parsing package [MAX_MATCHES] . Optimizations to bitvec routines: bitvec_count(), get_single() in the parser . Fixed several spots where > MAX_NUM_OBJECTS involved in a parse would cause crashes . Fixed strput/strput_words to not write past the end of their buffer when constructing long strings . Fixed a crasher in parse_add_synonym() (though it wouldn't crash until the synonym or parse_dump() was used) Thu Apr 25 01:32:46 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a29 * fixed a bug that would cause call_outs which were exact multiples of CALL_OUT_CYCLE to be delayed by one CALL_OUT_CYCLE (sometimes could happen with call_outs that differed by a small multiple of 2 from this) * removed an unused local in repeat_string * Fixed the parsing package to not crash when given a line containing more than 256 words (now it just returns; the limit can be set at the top of parser.c) Tue Apr 23 16:58:34 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a28 * added a contrib efun: repeat_string(string s, int n) which essentially does: sprintf("%-*'"+s+"'s", n, ""), but is readable. e.g. repeat_string("-=", 10) == "-=-=-=-=-=-=-=-" * redesigned call_outs slightly to allow constant time insertion * added a CALLOUT_HANDLES option, which has the following effects: . call_out returns an int, which can be passed to the following two efuns: remove_call_out(int handle) find_call_out(int handle) . Note that using the handle is more efficient than using the ob, function name version Tue Apr 16 11:29:13 EDT 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a27 * updated with respect to v21.7b21 * Fixed sort_array to work correctly when called from a sort callback Sun Mar 10 05:32:19 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a26 * updated with respect to v21.7b20 * Added Raistlin@IE's fix for a bug in replaceable()'s one argument case introduced in v22a23 which caused the one argument form to quit working * Fixed the ARCH define for 386bsd to not override the FreeBSD define * changed "stuf!" -> "unknown architecture", when ARCH cannot be determined * added a classp() efun * added support for \012 octal escapes and \x1e hex escapes in strings and character constants * added a comment about what the legal values of CFG_LIVING_HASH_SIZE are * crasher fix in the database package * put a remove_interactive() call back in that accidentally got removed at one point, which caused the driver to busy loop until a message was sent to the object whose link had died * COMPAT_BUSTER: two changes to call_stack(3): first, use strings instead of numbers to be consistent with origin(); second, a bug was fixed which was reporting the origin of the frame below the indicated frame, not the frame itself. * fixed compilation on systems that use _SC_PAGE_SIZE, not _SC_PAGESIZE Mon Mar 4 20:36:27 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a25 * updated with respect to v21.7b19 * added code to flush message queues when closing connections and shutting down * added a flush_messages(void | object) efun for manually flushing message queues (during a long thread of execution, for example) * fixed a bug that would cause some anonymous functions to not be bindable * fixed a crasher in recursive structures in error traces * fixed a bug in sprintf() column mode that would wrap early if a fit exactly in the width given Fri Mar 1 13:33:14 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a24 * added Pace@Callandor's patch for REVERSIBLE_EXPLODE_STRING * made PARSE_NUMERIC() into a routine instead of a macro, and added support for scientific notation so that very large/small floating point values restore correctly in restore_svalue() and friends Mon Feb 5 09:43:36 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a23 * updated with respect to v21.7b18 * added a 'parallel' target for parallel makes when using gmake * protected process_command against this_player() changing or being destructed during process_input() and other nasty places * removed the DEBUG_COMM_FREEZE code * made the message queue flushing a bit lazier which should result in smoother output and larger packet sizes * added Descartes' database package * added heart_beat_info() as a synonym for heart_beats() when COMPAT_32 is on * replaceable now can be optionally passed a second array argument which is a list of function names to ignore; if the second arg is left out, ({ "create" }) is assumed, which gives the old behavior. * added a function_owner(function) contrib efun. * made #undef PACKAGE_SOCKETS/#define PACKAGE_EXTERNAL compilation fail more gracefully * fixed a parser callback bug that caused the 'real names' of omitted args to be omitted too * added an error message for using the debug mode of parse_sentence when the driver wasn't compiled with DEBUG on * fixed a bug that would cause parse_sentence() to return large numbers instead of error strings * fixed a typo in the Incorrect argument to type %s error message. * fixed compilation when first_inventory() is disabled. Sat Feb 3 13:06:23 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a22 * fixed seteuid() to pass the correct second arg to valid_seteuid() * fixed the parsing package to not crash if parser_error_message() doesn't exist Sun Jan 21 21:29:34 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a21 * updated with respect to v21.7b16 * The master object and simul_efun object can be updated again when LPC_TO_C is not defined; patch from d.collins@ic.ac.uk * unified the code handling function pointers/extra args in various efuns; fixes crashers in rare cases. Also, sort_array() now takes additional args which are passed down the the function, like filter() et al. * Added a check for the /usr/ucbinclude directory in ./build.MudOS; Solaris needs from there * Removed push_string() internally; push_constant_string() should now only be used on string constants. The following changes will preserve previous behavior: . push_string(x, STRING_MALLOC) -> copy_and_push_string(x) . push_string(x, STRING_SHARED) -> share_and_push_string(x) . push_string(x, STRING_CONSTANT) -> push_constant_string(x) . push_constant_string(x) -> share_and_push_string(x) also, new function: push_shared_string(), which pushes and references a known shared string. * optimized the PORT_ASCII code a bit, and fixed some problems/loops in it in the presence of bad input/errors * fixed a bug that would cause message() to send messages/avoid the wrong people if the target/avoid argument was _not_ an array, and the function was called during the processing of another message call whose target/avoid was also not an array * removed XALLOC(), since it isn't used any more * fixed mapping hash distribution and centralized the definition of it * optimized terminal_colour a bit * optimized present() a bit; also fixed a leak in errors in id() functions * the message of the message() efun may now be of any type; this actually was side effect of a fix that makes message() more efficient :-) * fixed a crasher in sprintf() table mode, when no number of columns was specified (best fit) * improved the packages/ and mudlib/ dependencies a bit * configure.h is now remade if the information in 'uname -a' changes * no longer log a 'double call to remove_interactive()' if an object self-destructs in net_dead() * There is no longer a limit on the number of sockets available; if a limit is wanted it should be enforced in valid_socket() * fixed sprintf() column mode to wrap at the column width, not one before * added a couple testsuite tests for sprintf table mode * ./build.MudOS now prints an error message if an unknown kind of build is attempted instead of silently assuming the default * Parser changes: . Two new restrictions; only one plural token is allowed per rule, and only two object tokens are allowed per rule. The second may disappear after I clean it up a bit. . fixed a crasher in having more than MAX_NUM_OBJECTS involved in a parse . 'all' is now supported, also 'all of ...', 'all red swords', etc . Cases where more than one object are matches, but only one makes sense now work . in callbacks, only objects that have been completely parsed can be refered to. This means can_ and direct_ functions can't reference the direct or indirect objects. The corresponding spots in the argument list are missing. . OBS rules use the _obj_ callbacks, with the exception of do_ . error handling is now up to the master object via the parser_error_message() apply. The first argument is a int indicating the error type. The second is an object if this message corresponds to part of a plural match, otherwise it is zero. The third and following args depend on the error type (from include/parser_error.h): ERR_IS_NOT, ERR_NO_LIVING, ERR_NOT_ACCESSIBLE: the noun used, and then 0/1 depending on whether there ambiguity ERR_AMBIG: an array of objects that might have matched ERR_ORDINAL: The number that was refered to ERR_THERE_IS_NO: The string that couldn't be matched ERR_ALLOCATED: The error message returned by the mudlib ERR_BAD_MULTIPLE: nothing [note: if you want more info that you think the parser might have, let me know] compat/parser_error.c has a decent approximation of the old behavior . do_foo_obs() gets an array of objects and error messages as the arg corresponding to obs . Returned error strings which start with '#' are assumed to be nonsense messages, and aren't counted for the purpose of ordinals and all. Useful to prevent 'get all' from printing an error for yourself and the room, and to keep 'drop first sword' from counting swords in the room. Sat Jan 20 15:47:06 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a20 * removed process_string() and process_value(); simul_efuns are availaible in the compat/simuls directory * Fixed a memory leak in new(class foo, bar : baz, ...) * fixed compilation problems in grammar.y.pre, shallow_inherit_list, object.c * fixed a typo: m_indices() is keys(), not values(); also added m_delete * pluralization fixes: 'are', 'mackerel' * added Rust's timezone efuns to contrib; turned off by default since they may not compile everywhere Wed Jan 3 16:12:50 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a19 * updated with respect to v21.7b15 * All values which were previously 'null' are now undefined instead; nullp() is now exactly the same as undefinedp() * added a COMPAT_32 option, which tweaks a few things to allow some 3.2/3.2.1 code to be ported easier; see options.h for what changes * shallow_inherit_list() is now the same as inherit_list() [unless COMPAT_32 is on, in which shallow_inherit_list() is the MudOS behavior, and inherit_list() becomes deep_inherit_list() ] * error message change: Missing type -> Missing type for global variable * Don't raise type mismatch errors for code of the form 'identifier = expr'; 'Missing type for global variable' is good enough * Don't manually include and in interpret.c; trust configure instead * fixed a parser crasher in refering to 'noun', when more than 4 adjectives are possible * Fixed sprintf table mode to not stretch the last line to fit the field width Wed Jan 3 14:29:43 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a18 * fixed some serious flaws in class member lookup introduced in a17 Tue Jan 2 17:59:42 EST 1996 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a17 * updated with respect to v21.7b14 * fixed a crasher in the call_out leak fix from v22a1 * turned off PACKAGE_EXTERNAL by default * fixed a bug that caused the messages from saving the ed buffer of an object which was dested while in ed to be appended to the start of the next message sent to an object using ed. * check for wait3() as well before using BSD signals * removed wait() from lint.h since we include now * fixed a couple bugs in the handling of functions in the memory leak tracking code * fixed a crasher in add_action(function) when the driver is run with the -d flag * fixed the addr_server not to crash if gethostbyname() fails for some reason * function(...) { ... } is now rebindable if it does not reference local functions or global variables * switch (...) { case 0: function() { break; }; }, while (...) { function() { continue; }; }, and similar pathological code is no longer allowed. * bind(f, ob) now always succeeds if f is already bound to ob * added back the fast version of livings() from v22a14 as a contrib efun named_livings(); also fixed it to not return objects which are no longer living() * added class support in reclaim_objects() * trailing justification is no longer added to the last line of tables if no pad string was specified * The following is now legal: class foo { int x; string y; } class foo f1 = new(class foo, x : 5); class foo f2 = new(class foo, y : "foo", x : 1); Sat Dec 30 20:55:41 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a16 * updated with respect to v21.7b13 * changed the name of strerror to port_strerror to avoid prototypes on SunOS, which prototypes the function but never defines it * Removed a number of prototypes in lint.h for functions which are also prototyped in SunOS headers now * Fixed a bug that would prevent two way communication with external commands * Small optimization to the string case of socket_write * Tracked down the real problem which caused sprintf() to crash on empty tables; also fixed a crasher empty lines in column mode * reversed the livings() patch, since not all living objects are in the hash table * #ifdef'd out some unnecessary code for when LPC_TO_C is off * Remember to wait on our children, so we don't create zombies; configure checks to figure out whether to do it the BSD or Sys V way * Removed some archaic defines from portability.h * Changed the parse_sentence return codes again: 1 - success 0 - no such verb -1 - verb exists, but no rule matched -2 - a rule made sense, but can_ or direct_ failed * Fixed a typo in the 'Illegal master object file name' error message Fri Dec 8 20:53:11 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a15 * updated with respect to v21.7b12 * changed livings() to walk the living hash table instead of the full object list; idea from Jihad * '\r' is now treated as whitespace by the compiler * The success return code of parse_sentence is now 3, not 1. * changed the return type of parse_sentence from 'int' to 'mixed' * Fixed a crasher in using a function pointer as a read callback * If PACKAGE_EXTERNAL is defined, then lines of the form: external_cmd_1: /usr/local/bin/gzip in the config file allow the mud to run the command using the following efun: int external_start(int which, string args, mixed read_cb, mixed write_cb, mixed close_cb) which is the command number (e.g. 1 from the example above) args is the argument passed to the command. A socket is returned, which can be used to communicate with stdin/stdout of the command. valid_socket() is passed "external" as the operation. Up to 5 commands are allowed. Thu Dec 21 01:33:34 PST 1995 (gstein@svpal.org (Deathblade)) * raised patchlevel to v22a14 * fixed varargs by tweaking grammar.y.pre to not turn off the TYPE_MOD_ARRAY flag for the varargs variable * fixed sprintf() crasher when tables are used (Rust and Zakk) Thu Dec 7 12:30:20 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a13 * fixed crasher in disabling a heart_beat during a heart_beat * fixed sprintf() to not add trailing padding onto wrapped strings * removed the break_string() efun. See compat/simuls/break_string.c for a replacement. * fixed a few more misoptimizations of last variable references by the optimizer. * added a warning for putting varargs args into a variable of non-array type, also fix a bug that would cause type errors if the prototype was in scope * parse_sentence now returns: 0 - no such verb 1 - verb exists, but no rule matched 2 - a rule made sense, but can_ or direct_ failed in the cases where it used to return zero. * parse_add_rule no longer has a third arg; it is always this_object() * New parse efun: parse_add_synonym(string new, string old): . interpret the verb 'new' as if it were the verb 'old', and parse using 'old's rules and routines parse_add_synonym(string new, string old, string rule): . 'new' acts like 'old' for only the rule 'rule', which must have been previously added. Can be called multiple times. Wed Dec 6 18:00:15 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a12 * fixed a crasher in passing a negative number as the field width via the '*' specifier * fixed a crasher in strings which were too long to fit into tables in table mode Tue Dec 5 19:30:12 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a11 * fixed two crashers in the table generation logic of sprintf(), also fixed a bug that would cause the second and following lines to be indented wrong * fixed tables to fully fill the space allocated to them in the format description * The fill pattern for tables and columns always fills out the entire 'box' now; e.g. printf("%#|30'.'s\n", "apple\nbannana\ncherry\ndonut\nelf\nfruit\n") gives: ...apple....cherry......elf... ..bannana....donut.....fruit.. and not: ...apple....cherry......elf ..bannana....donut.....fruit Mon Dec 4 16:13:59 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a10 * updated with respect to v21.7b11 * moved values_list in function_context_t and node in decl to align slightly better * fixed the direct/dirent check to include std_incl.h in case it has some defines needed by those files * removed some really old and unused files of the compiler %union (address and funp; the second of which predates me ...) * small optimization to the lexer's handling of comments in preprocessor lines * major changes to sprintf.c: . COMPAT_BUSTER: error messages are never returned any more, but are thrown as errors instead. . 'clean' is no longer used, so cannot be leaked . COMPAT_BUSTER: "%^" is no longer special (for efficiency reasons, as well as disagreements on the exact algorithm) . The format string is never written into, eliminating the need for savechars and related hacks; fixes a crasher in extremely long strings in tables (>2k) . The setjmp()/longjmp() is gone, since the cleanup can be done on the next call to sprintf() now . sprintf() is now officially not reentrant, and you will get an error if you try. It probably crashed before if you tried it. The only LPC code called by sprintf() is object_name(), so this shouldn't be a problem . on the whole, things should be significantly faster (slightly more than 3 times faster on the small example I used), mostly due to collecting sets of characters instead of adding characters individually, and removing redundant length calculations . large portions of the file are now actually readable Mon Nov 27 22:51:35 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a9 * updated with respect to v21.7b10 * COMPAT_BUSTER: The scope of for and foreach loop variables is now only the inside of the loop. This also fixes a bug demonstrated by the following: { int i; for (int j;;) ; } { int i; } * Some error message changes: . Indexing on illegal type -> Value being indexed is zero/Cannot index value of type 'foo'. . Indexing a (string/array) with an illegal type -> (String/Array) indexes must be integers . Negative index passed to array -> Array index must be positive or zero Wed Nov 22 12:52:13 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a8 * updated with respect to v21.7b9 * fixed a typo in ./build.MudOS (CC -> $CC) * fixed a crasher in copying parse_command_* arrays which are empty Tue Nov 21 17:16:10 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a7 * updated with respect to v21.7b8 * fixed the ar test to make sure comptest.o exists in ./build.MudOS * Leading and trailing whitespace in the values in the config file is now ignored Wed Nov 15 14:41:20 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a6 * updated with respect to v21.7b7 * Better system for reporting bad malloc configurations (two malloc packages, etc) and system configuration errors * Report a redefinition error if classes with the same name are inherited from different files * Fixed the "Return type doesn't match prototype' error message to only be printed once per occurance, not twice Tue Nov 14 12:53:51 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a5 * updated with respect to v21.7b6 * A few small tweaks to the testsuite cleanup * fixed crasher in printing a string containing a '%' when NONINTERACTIVE_STDERR_WRITE was defined * some small cleanups to includes in socket_ctrl.c Tue Nov 7 17:50:22 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a4 * updated with respect to v21.7b5 * updated all the Makefiles with respect to Makefile.master * minor change: use 0 instead of -1 for master_ob not loaded yet since we no longer have to distinguish between unloaded/not loaded yet * added MDmemcheck() which can be inserted into the source to do internal memory consistency checks and abort if corruption is found * added back some parser fixes that were missing due to reversed patches * Two new options to ./build.MudOS: - ./build.MudOS develop -> turn on warnings and debugging code - ./build.MudOS debug -> turn on debugging symbols and code Fri Nov 3 16:41:11 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a3 * updated with respect to v21.7b4 * couple changes to void handling, basically (int)->(void) is no longer legal. The following are now errors: . int f(void x) { ... } . ... { void x; } ... . void x; . class foo { void x; } . void f() { return 1; } * defining a variable is now allowed in foreach, e.g.: . foreach (string x, object y in z) * fixed a crasher in errors in parse_* callbacks Sun Oct 8 19:48:21 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a2 * updated with respect to v21.7b3 * COMPAT_BUSTER: previous_object() == 0 and not this_object() in heart_beats * remove_call_out(/* no arg */) now returns 0 always, not -1 * fixed a bug in the replace_string() with all 5 arguments in some cases * fixed a bug in restoring mappings which had arrays/mappings/ floats as keys * added some missing newlines to regexp() error messages * fix to the center/left justify case for ints; remember to add the padding to the right side as well in sprintf() * more testsuite efun tests; finished through 'sprintf()' or so * made it illegal to undefine or redefine a global define like __VERSION__ * added a NO_RESETS option * better error message for people who don't choose a malloc package * fixed various crashers involving passing garbage back to the parser inside arrays * fixed leak in sprintf() for printing recursive structures; attempting to do so no longer errors. Sun Oct 8 19:27:28 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v22a1 * removed some outdated code (c_filter() and f_creator()) * fixed a crasher in removing heart_beats during a heart_beat * fixed a leak in call_outs with more than one extra argument * fixed a leak in illegal arguments to call_stack() * fixed set_light() to compile with NO_ENVIRONMENT (for the ultimate in bleeding edge uses of archaic efuns :) ) * added some checks to make compilation bomb more informatively if two malloc packages/wrappers are specified * cleaned up the signal handling code a bit * fixed compilation of the matrix package * fixed compilation with NO_ENVIRONMENT and !NO_ADD_ACTION * fixed compilation with DO_MSTATS and SYSMALLOC * fixed testsuite to compile and work with either setting of INTERACTIVE_CATCH_TELL, NO_ADD_ACTION, PACKAGE_UIDS, NO_ENVIRONMENT, NO_WIZARDS, PRIVS * revamped the testsuite efun tests, and added tests for most of the efuns 'a' through 'r' or so * testsuite now logs compilation errors to /log/compile ---------------------------------------------------------------------------- v21.7a10 promoted to v21.7b1 Fri Sep 22 22:51:20 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a10 * fixed a bug that caused case 0: to not work in string switches * fixed a typo in the unknown pragma error message * rule priority is now calculated beforehand in the parser; this fixes the precedence of some errors and allows earlier shortcutting * 1st through 9th and first through ninth are now understood by the parser * "Which X do you mean?" is now more verbose * 'myself' is now the same as 'me' Mon Sep 11 03:37:53 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a9 * fixed debug_info(2, ...) to put all the info in the string; it was still sending some of it directly to this_user() * slight optimization (condense two consecutive strlen() calls) in regular expressions * -DPEDANTIC now allows the use of inline to be turned off, since gcc only defines __STRICT_ANSI__ when -ansi is used, and not when -pedantic is used, but -pedantic complains loudly about inline, and -ansi causes the SGI headers to break. Unfortunately, gcc only gives some useful warnings when -pedantic is on * fixed up some (unsigned char *) <-> (char *) problems * fixed an optimizer bug that would clobber range expressions and generate incorrect code * Added documentation of makefile targets to the makefiles * Added a .DEFAULT rule for the decoy makefiles so better errors are generated when the wrong make is used with a target * Made the SIGPIPE always reenable the handler, not just on Linux, since other OS's (Solaris) behave this way as well * Fixed the gettimeofday() check to use two args, so it wouldn't fail on BSD based systems * fixed a compile error in OPTIMIZE_FUNCTION_TABLE_SEARCH * added a handler to ignore SIGFPE for those systems that raise it * changed "create" to APPLY_CREATE in replaceable() * fixed a parser crasher when parse_command_users() doesn't exist * removed a if (pointer >= 0) check in the parser * fixed a crasher in the 'last match to error' handling in the parser * fixed a crasher in parse_command() when the object array had non-objects in it * fixed some NO_ENVIRONMENT compilation problems, especially when NO_ADD_ACTION was NOT also defined. (add_action w/o environments is a tad pointless, but it works now) * fixed a bug that cause query_verb() to only return the matched portion and not the entire verb * fixed (s)printf() to not print destructed objects Fri Sep 8 03:34:50 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a8 * updated match_path() to know about the mapping changes * preliminary OBS changes; OBS and LVS are recognized as tokens now; currently they behave exactly the same as OBJ and LIV * fixed a few uses of new_string as a variable name * fixed a parser in generating arguments for parser callbacks Sun Sep 3 21:47:54 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a7 * cleaned up -Wall compile * better code to check the string statistics, leading to: * fixed the string stats bug(s); the figure should be correct again now * improved the error message for "owner of function pointer destructed" * removed the storing of the hash value in mapping nodes; mapping memory usage should be down ~20%; also optimized a bit, so most mapping operations should be faster * crasher fix in %o case of parse_command() Wed Aug 30 19:36:35 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a6 * crasher fix in edit_source -configure from Valodin * moved the CONFIGURE_VERSION define to the end of configure.h so incomplete configure.h files are detected as corrupt * removed the each() efun * crasher fix in the optimizer (no local variables again) * updated the tag info in check_memory(1) * fixed check_memory() to not accidentally complain about the string it is building * fixed a bug in the mark and sweep memory debugging of the parser * fixed a crasher in verb handlers that call parse_refresh() * fixed a memory leak in objects that call parse_refresh() * remember to add the real names when calling can_* callbacks * fixed a bug that would cause parser error messages to be truncated * fixed a memory leak in incoming MUD mode socket packets * added a bunch of bug reports to Bugs * fixed a line number bug in '\' * fixed @@ to work again, evidentally noone has used in in over a year since it hasn't worked since Robocoder added L_ARRAY_OPEN ... * fixed odd errors if the end of the input buffer is hit while parsing a macro expansion; found by Tensor * fixed a line number bug in macro arguments with newlines in them Tue Aug 29 17:11:06 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a5 * updated with respect to v21.6b6 * Merged in Descartes' diffs for Windows NT and Windows 95. Someone please check these; I fixed/changed a bunch of things, but have no way of testing them, and there are probably some mistakes. * removed the old OS2 code, since noone ever got it to work ... * added support for foreach (int in string) * fixed a fatal error when a string > 64k in size was added to an outbuffer. * changed sprintf() to use outbuffers, speeding up sprintf a bit, and expanding the size limit to 64k * fixed type error for sizeof(array constant) * it's now legal for an ed range to go past the end of the file; any line # greater than the file size refers to the last line. * fixed a bug that caused varargs contraction to not be done when the call_other cache was hit, or when one does inh::foo() Sat Aug 26 19:37:38 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a4 * reorganized the function_t struct slightly to save a bit of memory * added a warning for return types that don't match their prototypes; currently ignores modifiers, since accepted usage is so gross in this respect it isn't even funny. The next item might help: * added "private:" which makes all function definitions/globals after it private (until the next such section). Works with any type modifier (static, private, protected, public, nomask, varargs) * optimization fix: remember to put the replacement node in the tree when doing: if (x) {} else y -> if (!x) y * catch, time_expression, and __TREE__ now generate explicit code to pop the value instead of doing it inside F_END_CATCH. This makes the grammar a bit simpler, and generates better code for catch { ... } and catch(x = ...), which are common cases * fixed sizeof( ({ ... }) ) to preserve side effects inside the array constant, for crappy code like sizeof( ({ i++ }) ), which now compiles to: i++, 1 * changed edit_source to include configuration info when doing tests, so we can check for defines in include files * run ranlib on the mudlib/ and packages/ files for systems that need/ like it. * added a WRD token in the parser, which is just like a STR but only matches one WoRD. * fixed a bug that chopped a letter off the results returned by STR rules * xxx_verb_yyy() callbacks now include the name of the verb in the 'real names' part of the argument list, so for example "kick! beek" would call (among other things): can_verb_obj("kick", OBJ(beek), "kick!", "beek") This should satisfy the people who have been mailbombing me asking for a way to get at the real form of the verb :) * fixed a few warnings in the parser * When the return value of a construct is unused, and the construct has no side effects, replace it by it's arguments (recursively) possibly eliminating the construct entirely. i.e. the following generates no code: int x; class bar y; array z; ((({ ~x })[!x..foo)[(x*2)-1..] : ([1:2, 3:x])), -z[x]); Thu Aug 24 06:58:46 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a3 * configuration checks for broken libg.a Linux configurations, , -ldl, RTLD_LAZY * try cc -E -traditional-cpp as a possible preprocessor in build.MudOS * Use ANSI USHRT_MAX instead of MAXSHORT if availiable * reworked the handling of novalue efuns to be more robust; fixed crashers in (void efun) || (void efun) among other things. * Patches from Symmetry: . made Config.Example match the testsuite setup . fixed mapping case in dump_variable() for testsuite . bugfix in resolve_path() in testsuite . allow (: function() { return $1; } :) . optimize x[y..<1] to x[y..] . optimize dested obs in F_TRANSFER_LOCAL . crasher fix for swapped objects in program_info() . fixed disassembly of efun function pointers Mon Aug 21 03:58:32 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.7a2 * fixes from Symmetry for #undef RUNTIME_LOADING * added Zakk's query_ip_port() contrib efun for finding out which port an object connected to * fixed a parser bug that would sometimes cause objects to fail to be recognized the first time they were referenced. Many, many thanks to Deathblade for helping to track down this one * Added filenames to the parser error messages * improved the handling of punctuation; verbs do NOT include punctuation again, although this may change; stay tuned ... Thu Aug 3 20:25:27 EDT 1995 (tim@handel.princeton.edu (Beek)) * created v21.7a1 from v21.6b3 * valid_compile_to_c() in the master object now controls the use of the generate_source efun. * RUNTIME_LOADING works if your system supports dlopen()/dlsym(); define it in options.h, then use generate_source(filename) to load the object. Note that /lpc2c in the mudlib must be a symbolic link to the driver source. Objects loaded in this manner do not show up on lpc_info() [yet] * The restriction which disallowed cloning of objects with environments was removed * destruct()'ing the master or simul_efun object now fails if a new copy can't be loaded. This means that once the mud starts, a master or simul_object is ALWAYS loaded. * preliminary changes for disallowing calls to private functions; you can still get past it in odd cases (e.g. calling the function before you inherit it) More changes in a patchlevel or two. * fixed a bug that caused // and /* to be interpreted as comments within continuation lines in #define's * fixed the F_WHILE_DEC optimization, and added support for it in loops of the form 'for (...; x--; ...) { ... }'. Centralized the handling of loop test optimization. * optimize empty blocks for if's * removed some mentions of 'actlab' in the docs * added some new exit codes to the Exit_Codes doc * added NO_ENVIRONMENT in options.h * fixed the disassembly of F_LOOP_COND_NUMBER * fixed a crasher/wierd behavior in using 'array' to declare arrays * fixed a bug that made using a (blank) simul_efun object necessary * added DEBUGMALLOC support for the parsing package * added support for classes in copy() * fixed a bug that chopped the last letter off of some parser error messages * updated the testsuite lib to run under the default driver configuration ---------------------------------------------------------------------------- (v21.6a11 promoted to v21.6b1) Tue Jul 18 02:23:22 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a11 * updated with respect to v21.5b10 * fix from Marius for a crasher in x[C introduced during the compiler rewrite * only include if MAXSHORT isn't in * fixed a crasher in filter() * fixed 'safe' -> 'saves' in pluralize() * fixed TRACE compilation with NO_WIZARDS * fixed regexp() to not crash on eight-bit characters in the format on hosts where 'char' is signed Sat Jul 15 14:35:50 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a10 * updated with respect to v21.5b9 * backed out the VOLATILE changes to compile_file.c since it relies on a gcc extension * fixed a crasher in true varargs functions with local variables * added configure checks for and * fixed a crasher in undefined functions * COMPAT_BUSTER: filter_mapping() now passes the value as the second element, just like map_mapping() * fixed the Makefile to support options in grammar.y.pre; this probably should be changed to use a %include "options_incl.h" * added y.output and tmpdepend to 'make clean' * fixed `system_libs` -> `cat system_libs` in the Makefile * fixed a few DEBUG crashers in the parser package Thu Jul 13 04:05:49 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a9 * updated with respect to v21.5b8 * backed out the VOLATILE changes to sprintf.c since it relies on a gcc extension * updated the Makefile not to define EDIT_SOURCE any more * implemented the parser generated error messages for the parsing package * added the other half of varargs support, allowing the following: void log(string file, string fmt, array args ...) { write_file(file, sprintf(fmt, args ...)); } void foo(int x) { log("/log/foo", "foo() was called with: %i\n", x); } Thu Jul 6 03:52:27 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a8 * fixed to_float("illegal string") to always return 0.000000 * added testsuite tests for to_int() and to_float() * fixed a crasher in illegal indexes to array constants * 'make depend' now works again when using GNU make * edit_source -configure is never rerun if configure.h exists, even if the file is out of date (it takes too long, and the info shouldn't change). * fixed a dependency problem that caused configure.h not to get built * DEBUG is now visible to %ifdefs * check for ; MAXSHORT is there on SGI * removed some unused variables * added __TREE__(expr) and __TREE__{ ... } which evaluate to arrays representing the compiler's internal representation (IR) of the given code. For example, __TREE__(x + y) gives: ({ "binary op", "+", ({ "opcode_1", "local", 0 }), ({ "opcode_1", "local", 1 }) }) * catch { ... } and time_expression { ... } are now legal. * if ARRAY_RESERVED_WORD is on, then 'array' now associates with the type and not the var, for example: int array x, y == int *x, *y and not int *x, y * 'array' by itself is now allowed, meaning 'mixed *' * fixed a bug in type checking that allowed 'x *' and 'x' to be compatible in one order, but not the reverse Fri Jun 30 16:44:33 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a7 * updated with respect to v21.5b6 * merged Makefile.MudOS back into the main Makefile * added implode(array, function, mixed) where the third argument is the value to start with, as in: flatten(arr) { if (arrayp(arr)) return implode(arr,(: $1 + flatten($2) :),({})); else return arr; } * fixed make_func.y to give file and line numbers on fatal errors * added configure checks for getrusage(), times(), gettimeofday(), and fchmod() instead of using hard coded information * figure out the correct type for UINT32 in configure * removed the 0.9.18 compat efun package * fixed a crasher in remove_interactive() * disabled the lookat_rotate2 efun in the matrix package as it uses more arguments than the compiler currently supports Tue Jun 27 01:10:27 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a6 * fixed the debug checks to not panic on nested foreach's * fixed edit_source -configure to not get fooled by OSF's queer non-standard BSD compatibility includes * fixed a crasher in passing a bad argument to call_stack() * optimized upper_case() and lower_case() * fixed an ANSI style declaration in eoperators.c * a couple minor fixes for alpha; also fixed DEBUGMALLOC to work correctly on alphas Fri Jun 23 02:39:02 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a5 * updated with respect to v21.5b4 * fixed a bug that caused sizeof(array constant) to always be 16 Tue Jun 20 16:25:14 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a4 * updated with respect to v21.5b3 * fixed a few bug in using x[y..z] as an lvalue * fixed an error in setting the return type of time_expression() * added packages/parser.c, a flexible parsing system for interactive fiction applications * fixed a crasher in variables() * added a workaround for getting EINTR while trying to seek the swap file Sun Jun 18 11:33:07 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a3 * fixed a bunch of warnings from gcc -Wall * fixed c_update_branch_list() to not generate unused labels * COMPAT_BUSTER: origin() and typeof() now return strings. If you use the defines in the driver include/ files, you're fine (assuming you update your includes) * fixed some compilation problems with local variable optimizations * put the mudlib/ directory back to the default one * fixed a bug that was disabling the while_dec optimization * efun::new() is legal again * the type info in functions() are now strings * variables now has an optional flag just like functions * fixed a bug in replace_string() that would not copy the elements which matched the search string which were not replaced in the case when the replace string is longer than the search string Thu Jun 15 09:15:23 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a2 * updated with respect to v21.5b2 * made functional procedures in LPC->C static so they don't interfere across multiple files * fixed a bug that inserted extra to_int/to_float() calls even when the expression had already been reduced as a constant, i.e. 1 + 2.3 -> 3.3 and not to_float(3.3) * reorganized the compiler's intermediate representation to be easier to optimize/generate code from. nodes now have general types like NODE_BINARY_OP instead of the old form. * removed support for PRAGMA_EFUN * optimized the last use of a local in a frame by transfering instead of copying. If the last use is in a switch() or loop it is ignored. The same trick is also done for use of a local right before an assignment, as in: write(x); x = 1; (only done when #pragma optimize is on) * split F_LOOP_COND up into F_LOOP_COND_NUMBER and F_LOOP_COND_LOCAL Mon Jun 12 04:45:44 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.6a1 * expression function pointers, anonymous functions, and foreach now work in LPC->C code. * added class support in LPC->C code * updated ccode.c with the icode.c cleanups * added a warning for [x] and [y..x] when x is a negative constant * optimized LPC->C string constants * optimized the calling of efuns. All arguments are now checked automatically. The format is now: . efuns which _always_ take one arg have opcodes like eoperators . New efun eops which includes the number of arguments F_EFUN0, F_EFUN1, F_EFUN2, F_EFUN3 which is followed by the efun index . F_EFUNV for efun calls using 4 or more args * some reorganization and cleaning up of make_func.y to allow the above * inlined efun calling for efun pointers. This should make (: efun, ... :) significantly faster than (: efun(...) :) --------------------------------------------------------------------------- (v21.5a6 promoted to v21.5b1) Sat Jun 3 21:32:15 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a6 * updated with respect to v21.4b11 * fixed a bug in replace_string(x, y, z) when strlen(y)==strlen(z)==1 and another one when strlen(z) < strlen(y) * added a ... operator which expands an array into a list of arguments. it is legal in varargs efuns, function calls, varargs efun pointers, and array constants (the last can be useful; ({ x, y..., z }) is the same as ({ x }) + y + ({ z }), but slightly faster) * COMPAT_BUSTER: removed the apply() efun. A replacement is in the (new) directory compat/simuls. Basically, apply(f, arr) is now the same as evaluate(f, arr...) * fixed the space saving code that only generates a return 0 if the function doesn't end in a return to recognize the return_zero opcode Sat Jun 3 05:33:46 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a5 * fixed a bug in call_all_other that would return zero for all items other than the first Thu Jun 1 14:55:53 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a4 * updated with respect to v21.4b10 * COMPAT_BUSTER: If process_input returns a string, it behaves as before. If it returns a non-zero integer, no further processing will be done. In all cases, process_input will continue to be called if it exists. Mon May 29 22:28:50 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a3 * updated with respect to v21.4b9 * fixed a crasher in call_all_other Sat May 27 02:44:33 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.5a2 * updated with respect to v21.4b7 * optimized replace_string(foo, bar, bazz) when strlen(bar) is 0 or 1 Fri May 26 15:58:23 1995 (tim@handel.princeton.edu (Beek)) * created v21.5a1 from v21.4b6 * added the following diffs from Symmetry with minor modifications: . fixed type error messages to handle classes . optimized merge_arg_lists . optimized call_function_pointer a little . optimized call_all_other . support more general sscanf specifiers, including %(regexp), as well as %s%x and %s%% having the typical non-greedy %s support . small optimization to replace_program . made it so that set_heart_beat(0) and set_heart_beat(1) behave more consistently when called during a heart_beat . implemented heart_beats as an array which saves ~12 bytes in objects that don't have heartbeats --------------------------------------------------------------------------- (v21.4a9 promoted to v21.4b1) Tue May 16 07:07:17 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a9 * fixed a crasher in calling sprintf("...%O...") before the master had finished loading * fixed a few bugs in LPC->C compilation of string switch statements * fixed a problem with the GNUmakefile made by LPC->C * implemented ranges in switch statements for LPC->C * fixed a crasher in parse_command() * fixed catch() to work again from LPC->C code * fixed a crasher in dumpallobjects with respect to some function pointers * fixed a bug accidentally added last patchlevel which caused arrays and mappings to not restore when the 'noclear' flag was passed to restore_object Mon May 15 04:12:47 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a8 * fixed a bug that would truncate arrays/mappings sent over MUD mode sockets * added a missing #include of cfuns.h that caused undefined identifier errors during LPC->C compilation * specifying an address server in the config file is no longer necessary * fixed a crasher when the simul_efun object had no simuls in it * fixed a crasher in implode(array, function) * fixed a bug that caused catch() and function profiling to be ignored * fixed wierd behavior with respect to unterminated @ and @@ blocks * fixed a problem that would cause logging to fail of the log dir in the config file was specified as '/' Sat May 6 22:41:22 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a7 * updated with respect to v21.3b5 * fixed a ref count problem in heart_beats() * fixed a compilation problem for people who don't use 'local_options' * put the v21 README into the distribution * optimized implode_array * recognize IAC IAC as a quoted IAC character; this has two effects: . IAC can now be received by the mudlib . window sizes with widths and heights of 255 work again * fixed MUD mode sockets to work on machines where sizeof(long) > 4 * optimized member_array(), string compares, string hashing etc to check string length first; idea from Aragorn * fixed load_object() to not error if the file doesn't exist, also fixed the error messages to be better than 'Failed to load file' in many places * fixed a crasher in calling non-existent socket callbacks * fixed a few syntax errors in ed commands to not dump you out of ed * Added a bunch of stuff to Bugs/Ideas files; I'm going to try to keep them more up to date; dumped a lot of stuff from my todo list there * fixed generate_source() to not leak a file on some errors * fixed a bunch of problems with the upper_case() contrib efun; it was out of date with respect to counted strings * added Magician's remove_interactive() efun to the contrib package Sat May 6 19:03:29 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a6 * added 'mixed implode(mixed *, function)' /* sum all the elements in an array */ int sum(int *x) { return implode(x, (: $1 + $2 :)); } /* find the largest element */ mixed max(mixed *x) { return implode(x, (: $1 > $2 ? $1 : $2 :)); } /* with respect to an arbitrary function ... */ mixed max(mixed *x, function f) { return implode(x, (: evaluate($(f), $1, $2) > 0 ? $1 : $2 :)); } /* comma separated list of numbers */ string list(int *x) { return implode(x, (: $1 + ", " + $2 :)); } * cleaned up a lot of the Makefile dependencies Fri May 5 21:36:29 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a5 * fixed a typo in wrappedmalloc.h * memmove() is now checked in edit_source -configure * COMPAT_BUSTER: this_player() is zero is get_save_file_name(). The apply is now get_save_file_name(string fname, object who) * added foreach (, in ), which should behave the same as k = keys(m); for (i = 0; i < sizeof(k); k++) { x = k[i]; y = m[k[i]]; ... } * fixed a bug that gave odd error messages for illegal simulefun overrides * returned options.h to the MudOS distribution options * fixed crashers in terminal_colour() Fri May 5 03:25:54 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a4 * fixed some bad logic in rc.c that would sometimes write past the end of it's temporary buffer (rc.c needs a rewrite....) * fixed a Makefile bug that caused edit_source to try to include configure.h * added 'foreach ( in ) ' . currently only legal when is an array . foreach (x in y) { ... } should behave identically to for (i = 0; i < sizeof(y); i++) { x = y[i]; ... } with the exception that y is only evaluated once * fixed another crasher in people going linkdead in ed * added some output in edit_source.c related to local_options * fixed a bug in replace_string() that would miss occurences at the end of the string * fixed a typo in the alpha fix from last release * COMPAT_BUSTER: 'foreach' and 'in' are reserved words * COMPAT_BUSTER: map_mapping now passes the key and the value to the function * crasher fix in the contrib efun pluralize(); also corrects a bug that caused it to strip adjectives * fixed a few typos in smalloc.[ch] * added Symmetry's changes to testsuite's master and simul_efun obs Tue May 2 20:38:08 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a3 * fixed a bug that would ignore 'local_options' during compilation * fixed a bug in the handling of _OPTIONS_H_ * modified the OBJDIR rules not to recompile excessively * rewrote the error context handling, propagating Symmetry's error popping tricks everywhere, cleaning up the code, and removing some ancient code * fixed a bug in generate_source(string, ...) that produced an error message where there shouldn't be one * put ins_long() back in since 64 bit machines need it * fixed some incorrect calls to add_message in DO_MSTATS and TRACE_CODE * cleaned up user_parser; fixed some crashers * COMPAT_BUSTER: It is now illegal to any of the following from a verb action which return zero: . call remove_action() . destruct an object which defines commands . move an object which defines commands . move a living object * cleaned up the mudlib error handler code; fixed a leak therein * added ;'s in a few places in socket_efuns.c for strict ANSI compilation * optimized deallocate_string() in the same way free_string previously was * added Robocoder's patch to allow '\a' and '\e' (bell and escape) * fixed the stringified efuns to set the type of the return value to 'string' * fixed a crasher in clear_notify() * fixed a crasher in people going linkdead in ed * fixed a bug that would add an extra object on previous_object(-1) for lfun and functional pointers Tue May 2 19:34:55 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.4a2 * fixed a crasher when replace_string() was called on a string with more than one reference, and the replacement was smaller than the thing being replaced * fixed addr_server to compile again * fixed a crasher in string creation for the reworked efuns * added a case for the new F_WHILE_DEC code in the disassembler * slight optimization to replace_string :) * sizeof(class) now returns the number of members, not zero * fixed #undef OLD_ED compile * New contrib efuns: string *variables(object), object *heart_beats() Sun Apr 30 03:53:32 EDT 1995 (tim@handel.princeton.edu (Beek)) * created v21.4a1 from v21.3b1 * updated with respect to v21.3b4 * added Truilkan's optimized replace_string(): should be '15% to 40% faster' depending on the use. also modified it to work with counted strings, and slightly optimized the brute force (pattern length == 1) case * the logon() function is no longer required to exist * rearranged the output of the driver a bit, and cleaned up a lot of the related code. stdout and debug.log now both get the same information (with the exception of some stuff that only goes to stdout before debug.log is ready) * removed a lot of fidgeting with the value of command_giver COMPAT_BUSTER: the definition/existence of this_player() changed in some places. * COMPAT_BUSTER: A number of efuns now return strings instead of dumping info to this_player(): malloc_status(), cache_stats(), lpc_info(), mud_status(), dump_file_descriptors(), program_info(), debug_info(), dump_socket_status() * reorganized/rewrote varargs handling; default to the ANSI way if possible * function pointers can now be used for socket callbacks * New Feature: if you have a file 'local_options', it will be used instead of options.h. Also, edit_source will issue an error message if an option has been added to options.h that you don't have a setting for. --------------------------------------------------------------------------- (v21.3a7 promoted to v21.3b1) Tue Apr 25 15:43:47 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a7 * updated with respect to v21.2b8 * added Robocoder's optimization to read_buffer() * fixed a lot of things gcc -Wall complained about * fixed a crasher in disassembling code involving classes * fixed type checking to not give an error for missing type for arguments when type checking is off * fixed a bug which could cause type errors in non-type checked functions, especially wrt 'return x;' * fixed a problem that would cause edit_source -configure to run on every make * check return values and report file errors in edit_source -malloc * configure checks for , and if DEBUG is on (sgi prototypes for bzero, which is used by FD_ZERO is there) * only add -lmalloc if malloc() isn't in a standard library Tue Apr 25 15:25:06 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a6 * fixed misoptimizations of nullp() and undefinedp() * fixed a bug in array subtraction, intersection, and other operations (next person who uses & when they mean == will be shot) * fixed two typos in the build.MudOS script Sun Apr 23 18:53:24 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a5 * updated with respect to v21.2b7 * fixed a bug in the STRFUNCS check in ./build.MudOS * fixed some compilation problems with string functions and DEBUGMALLOC Sat Apr 22 21:38:11 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a4 * fixed some compilation problems with DEBUGMALLOC tags in function calls * fixed a typo in the T_REFED optimization that would cause the gamedriver to crash right after booting * fixed save/restore of classes * fixed reclaim_objects() to correctly handle destructed objects as mapping keys; the equivalent of map_delete() is now done on them * optimized free_string() with some ideas from Armand@TMI-2 Fri Apr 21 02:06:38 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a3 * updated with respect to v21.2b6 * optimized free_svalue() and assign_svalue_no_free() by handling all refed objects similarly and saving a switch() * fixed some compilation problems in interpret.c * fixed some of the tagged routines to depend on DEBUGMALLOC, not DEBUG * fixed the external declaration of svalue_strlen_size Tue Apr 11 12:23:36 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a2 * updated with respect to v21.2b5 * fixed a variable name clash (type_names) between interpret.c and compiler.c * edit_source -configure now checks for the existence of strerror() for better POSIX compatibility * fixed catch() to work from LPC->C code * if the compiler found is 'cc', check if it is gcc and if so use gcc's optimization flags * MAX_USERS no longer exists; instead, space is allocated as needed. a limit should probably be enforced by the mudlib to avoid running out of file descriptors ... * new efun alias: this_user() == this_player() * compile hash.o with optimization since it is used in the main driver as well as edit_source * added an optional flag to the functions() contrib efun: functions(object, 1) returns: ({ "function_name", num_arg, ret_type, arg1type, arg2type, ... }) where the types are the type numbers given by typeof() * COMPAT BUSTER: map_mapping now passes the value, not the key, to the function pointer. * evaluate() and apply() now return 'mixed' and don't need casting with CAST_CALL_OTHERS defined * rewrote malloc'ed strings to be ref counted and remember their lengths. This gives a factor of 2-5 speed gain on many string operations at the cost of 4 bytes of memory per string. However, the reference counts means that malloc'ed strings are not duplicated when copied, so despite the new overhead, many muds may see a reduction in memory used by strings. Note: If you are trying to test this, note that check_memory() and mud_status() now report ALL memory used by strings; previously only the memory used by shared strings was reported, the memory used by malloc'ed strings wasn't reported anywhere. * made strings statistics optional since they can have an impact on the speed of string operations. * driver guru info: where you used to do: now do: x = (char *)DXALLOC(n+1, ... x = new_string(n, "foo") FREE(x) FREE_MSTR(x) x = DREALLOC(x, ... x = extend_string(x, ... strlen(shared_string) SHARED_STRLEN(shared_string) note that string_copy() now returns a ref'd, counted string. if you really do just want a copy of an area as a normal allocated block, see alloc_cstring() Also, it isn't safe to assume you can write into a malloc'ed string now. See unlink_string_svalue() if you need to do it. * optimized explode() and implode() to use SVALUE_STRLEN to find the length of their arguments * removed some unused ed flags * added a new ed set option 'verbose' which shows number of lines and bytes in files, etc * added a check not to add -lcrypt if crypt() is defined in libc.a Tue Apr 11 00:36:00 EDT 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.3a1 * updated with respect to v21.2b3 * successfully compiled and ran the driver with all loaded objects compiled into the driver (LPC->C); the only things that may not work are catch() and defining functionals/expression pointers (although calling function pointers will work fine) * fixed a typo in the type checking code generated for to_float/to_int (LPC->C) * precompiled objects now depend upon binaries which are saved with the .B extension so they don't conflict with normal binaries * fixed in generation of the following LPC->C code: . while (i--) ... . for or while (x < y) ... * added support for (--x), (++x), void_assign_local, x--, (-x), (~x), x[C compiled code * generate_source() now sends precompiled objects into a mudlib/ subdir of the binaries dir if passed an array of files, and creates multiple source files there instead of one huge source file. The mudlib/ dir can be copied unchanged into the driver source dir and compiled. * removed support for ALWAYS_SAVE_COMPILED_BINARIES * made the output of lpc_info() more readable * F_WHILE_DEC now uses up one less byte * removed an unused version of find_status() * fixed a bug in sprintf's column option that would omit a character if a line was too wide ---------------------------------------------------------------------------- Thu Mar 30 15:45:30 EST 1995 * promoted to beta status (see v21.1b1) * updated with respect to v21 * Two new contrib efuns: . void store_variable(string name, mixed value) . mixed fetch_variable(string name) These can be used for simulating set(), implementing debuggers, etc: foo = bar <-> store_variable("foo", bar) return foo <-> return fetch_variable("foo") set(string foo, mixed bar) { switch (foo) { case "name": case "hp": store_variable(foo, bar); break; default: ... * fixed a number of typos/problems with the Makefile/GNUmakefile that would cause compilation to fail * Added an option to have up to 5 external ports These can be specified in the config file. The format is: external_port_x : kind # where x is 1, 2, 3, 4, 5; kind is telnet, binary, or ascii and # is the port number. For compatibility, the line: mud port : 5555 is the same as external_port_1 : telnet 5555 'telnet' ports act the same as previously. 'ascii' ports send no telnet characters, and don't do any interpretation of the text they receive except to pass it one line at a time to process_input(). 'binary' ports act very much like 'ascii' ports, except that buffers are passed to process_input() * Added in a fix from Robocoder for using smalloc or bsdmalloc with debugmalloc or wrappedmalloc; previous smalloc or bsdmalloc was erroneously ignored and sysmalloc used * Added in a fix from Jeearr for build.MudOS which would cause it to die if GNU make wasn't present * optimizations: return 0 is now 1 opcode loop conditions involving < multiple pushes in a row compressed into a quick format x == y, !(x != y), x < y, !(x >= y), x > y, !(x <= y), x != y, !(x == y) in if statements and ( ? : ) !x, x==0, etc in ( ? : ) * connect() is now passed the port # to which the user connected * reworked rc.c a bit * changed all the references to NO_UIDS to PACKAGE_UIDS; this was causing compilation to fail with NO_UIDS off * re-indented interpret.c * fixed compilation of functions(), replaceable() and pluralize() (contrib) * COMPAT_BUSTER: "efun", "new", and "asm" are no longer valid function/variable names * all type names are now valid in foo::bar Fri Mar 24 20:59:08 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a6 * updated with respect to v21.1b7 * The build procedure has changed drastically: (1) edit the top of build.MudOS to configure a few things. You should only have to do this if you have an obscure operating system or want to change INSTALL_DIR, etc (2) "./build.MudOS" The script will munge for a while, then print out the configuration it determines. (3) if you don't like what build.MudOS decided, edit the top of Makefile/GNUmakefile. (4) type make/gmake, as appropriate (5) type make install, or move the binary to whereever you want it * technical details: The build process goes more or less as follows: (1) ./build.MudOS determines enough system parameters to allow the compilation of edit_source (2) edit_source is built, then run to process options, configure malloc, create various makefiles and check which libraries and include files exist (3) Makefile.MudOS is then executed in order to build the main driver executable * stage (2) of the compilation is run with optimization off, as edit_source takes longer to compile than to run ... * Both GNUmakefiles and Makefiles are generated from a common file. developers should edit Makefile.master and then run 'make Makefiles' if changes to the build process are wanted. (This was actually added last pl, but now applies to 3 makefiles) * modified terminal_type negotiation to comply with the relevant RFC's; this may increase the number of systems it works with. * added NAWS window size automatic negotiation; the callback is: void window_size(int width, int height) * optimized the pushing of call_out arguments * added a missing prototype for c_generate_node() * fixed/kludged errors in #include to report the right line number * renamed DISALLOW_BUFFER_TYPE to NO_BUFFER_TYPE Wed Mar 22 23:37:55 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a5 * added a mudlib/ directory to hold LPC->C compiled code * mudlib/ and packages/ compilation now use libaries to avoid packages/*.c kludges and the like * added Symmetry's diffs to allow for recursive class definitions, allowing linked lists, etc to be constructed * packages are now specified in options.h instead of fooling with func_spec.c. This will work for any package, even ones not included with MudOS (PACKAGE_AURORA, for example, will automatically compile and use packages/aurora.c and packages/aurora.spec) in addition, a #include in func_spec is no longer necessary * removed all references to the MIRE package * in the driver source: NO_MUDLIB_STATS -> !PACKAGE_MUDLIB_STATS SOCKET_EFUNS -> PACKAGE_SOCKETS * Fixed a number of instances where messages including filenames had no leading '/' * added F_VOID_ASSIGN_LOCAL: x = ... is now a single opcode * applied Robocoder's fix for a problem where 'continue' would get confused in nested loops * removed some useless code from F_VOID_ASSIGN * removed make_malloc and make_func and replaced them with edit_source; cleaned up the associated code * added preprocess.c which centralizes some of the code used by both lex.c and edit_source.c; more work needed here. Unfortunately, it has to be #included since edit_source.c can't stand MALLOC * COMPAT_BUSTER: removed a bunch of LPC predefines SAVE_EXTENSION: use __SAVE_EXTENSION__ USE_EUID: use ! __NO_UIDS__ HAS_BUFFER_TYPE: use ! __DISALLOW_BUFFER_TYPE__ HAS_SOCKETS: use __PACKAGE_SOCKETS__ HAS_SHADOWS: use ! __NO_SHADOWS__ HAS_DEBUGMALLOC: use __DEBUGMALLOC__ && __DEBUGMALLOC_EXTENSIONS__ HAS_MATH: use __PACKAGE_MATH__ HAS_PROFILE_FUNCTIONS: use __PROFILE_FUNCTIONS__ HAS_MATRIX: use __PACKAGE_MATRIX__ HAS_PRIVS: use __PRIVS__ HAS_EACH: use __EACH__ HAS_CACHE_STATS: use __CACHE_STATS__ HAS_OPCPROF: use __OPCPROF__ HAS_MUDLIB_ERROR_HANDER: use __MUDLIB_ERROR_HANDLER HAS_MUDLIB_STATS:use ! __NO_MUDLIB_STATS__ HAS_LIGHT: use ! __NO_LIGHT__ * removed the debugging code from the identifier hash table code since it appears to be bug free * fixed a crasher in Robocoder's config file fix when lines were missing from the config file * consolidated some of the error reporting code * both GNUmakefile and Makefile are now generated from Makefile.master via GNUmakefile.pre and Makefile.pre; one side effect of this is that you can use 'make Makefiles' to return your Makefile to it's unedited state * fixed a crasher in objects dested from some socket callbacks Sun Mar 19 02:32:56 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a4 * updated with respect to v21.1b6 * REALLY added in the diffs from v21.1b5 (I forgot to run patch last patchlevel) Sun Mar 19 02:32:56 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a3 * updated with respect to v21.1b5 Sat Mar 4 16:14:17 EST 1995 (tim@handel.princeton.edu (Beek)) * bumped patchlevel to v21.2a2 * updated with respect to v21.1b4 * fixed compilation with #undef OLD_ED (object_ed_output() changed to global scope; it's used by regexp_error()) * fixed a bug that would incorrectly claim filenames had // in them on some operating systems * changed the above error message to say what the filename was :) * COMPAT_BUSTER: privs_file is now called to get new privs for virtual objects which are loaded. This is a bit of an oddity; virtual objects actually get created twice, so it's hard to say what should be done when. Possibly, mudlib_stats should be also be reinitialized. Currently, they behave the same way as the object returned from compile_file() which is inconsistent with their filename (which was the old behavior of PRIVS as well) The same problem exists with UIDS. This may change in the future. Sat Mar 4 16:14:17 EST 1995 (tim@handel.princeton.edu (Beek)) * v21.2a1 created from v21.1b3 * added code to not generate unreachable code in LPC->C generation since SGI cc is very noisy about that and it happens a lot. * protect special characters string constant case labels with '\' when generating switch tables (LPC->C) * fixed a cases for int switches to use the correct field (LPC->C) * added more name mangling for switch table names so they don't collide (LPC->C) ---------------------------------------------------------------------------- Wed Mar 1 18:14:01 EST 1995 (tim@handel.princeton.edu (Beek)) * v21.1a5 promoted to beta status (see v21.1b1) Fri Feb 24 23:48:38 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a5 * brought up to date with respect to v21b15 * MASSIVE source cleanup . 'arrays' are always refered to as arrays and never vectors/pointers . all types now use foo_t syntax instead of struct foo . several header files cleaned up and includes reorganized . removed internal distinction between internal and external programs (i.e. foo->p.i.bar is now foo->bar) * centralized the processing of "/foo/bar.c" -> "foo/bar" * removed support for RUNTIME_LOADING * removed support for #undef NEW_FUNCTIONS * in addition to the above, call_other pointers are gone. (: x, y :) should be converted to (: call_other, x, y :) the functionality remains unchanged, since that's all they really did ... * function pointers reorganized to use less memory (the size is now variable based on the ammount of space needed, so a lfun pointer can be significantly smaller) * added OPCPROF_2D which keeps statistics on the most commonly executed *pairs* of instructions * regexp errors in regexp efuns now use error(), instead of printing a message to this_player() which eroneously refers to ed ... * LPC_TO_C now works for compiling objects into the driver. (1) make sure #pragma save_binary is on in all objects to be compiled (2) do a generate_source( ) (3) copy /binaries/interface.c into your source dir (replacing the provided one) (4) recompile the driver (5) the lpc_info() efun can be used to see if the new programs are being used; other than that there should be no visible difference, other than speed. Wed Feb 15 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a4 * brought up to date with respect to v21b10 * optimized the handling of the redefinable keywords 'efun', 'asm', and 'new' * Floats and ints are now automatically interconverted in the following cases: . Passing an int to a efun that takes a float and not an int, and vice versa. Hence, sqrt(5) is legal. . during initialization (as in float x = 5) . Note: the above depends on compile time checks so if you exploit mixed, etc to put an int in a float variable it will misbehave * added limited support for classes (no member functions): . structure definitions are stored in programs, which means they can be passed down via inheritance . definition of the type is as follows: class { ; ... } Ex: class my_first_class { int my_number; string my_string; } . declaring a variable of that type: class ; Ex: class my_first_class my_var; . instantiating a class: = new(class ); Ex: my_var = new(class my_first_class); . assigning to/using a member -> = whatever ... Ex: my_var->my_string = "It worked!"; Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a3 * brought up to date with respect to v21b8 * fixed the define used by cfuns.h to be different from the one ccode.h used * generate_source() now returns zero if there were compilation errors * modified lower_case() to be slightly more portable and easier to read * inlined sapply() into apply() and apply_master_ob() by hand * fixed a unrecognized #pragma crasher (the list wasn't terminated) * fiddled with the default settings of options.h * new contrib efuns: string pluralize(string) int file_length(string) string upper_case(string) Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a2 * brought up to date with respect to v21b7 * added prototypes for all the c_* functions in ccode.c * fixed the Makefile and GNUmakefile; removed obsolete files * fixed generate_source() to use 'package fname;' instead of 'package lpc_to_c;' when outputting to 'fname.c' and 'fname.spec' * removed support for add_action(string); all it did was cause errors anyway ... Thu Feb 2 00:16:55 EST 1995 (tim@handel.princeton.edu (Beek)) * raised patchlevel to v21.1a1 * brought up to date with respect to v21b5 * COMPAT_BUSTER: removed the following options.h defines and related behavior: OLD_HEARTBEAT, OLD_COMMAND, IGNORE_STRICT_PRAGMA * COMPAT_BUSTER: STRICT_TYPE_CHECKING removed, use PRAGMA_STRICT_TYPES as a default pragma * COMPAT_BUSTER: ALWAYS_SAVE_BINARIES removed, use PRAGMA_SAVE_BINARY as a default pragma * COMPAT_BUSTER: move_object only takes 1 argument. change move_object(this_object(), foo) to move_object(foo) * LPC->C restored to working condition in a limited sense: . new pragma #pragma efun ignored during regular compiling . generate_source("source_file.c", "destination_file.c") will compile "source_file.c" into an efun package made up of "destination_file.c" and "destination_file.spec" which can be linked into the driver . note that it is illegal to do the following in an efun: - call a local function -> this really can't be done - call a simul_efun -> see above. Use efun:: to get around write simul_efuns, etc; the driver won't complain about illegal overrides while generating efun source - use a global variable -> wait for future fixes . LPC->C for objects doesn't work as of this release; only creation of efuns in packages (useful for efunizing simuls) . various things not supported yet; most notably functionals, also string switches are supported but buggy; let me know if you have other problems (esp. linking errors) * added some internal stuff for structures; work in progress. ignore the 1 shift/reduce conflict as it won't affect normal LPC code. * define_new_function() doesn't take the offset any more; this is set explicitly where needed (2 places) * argument types are actually saved why #pragma save_types is used. They still aren't used yet tho. * the format of switch parse trees was tweaked a bit to help LPC->C compilation * removed some unused i_generate_* functions * push_indexed_lvalue in interpret.c is no longer static; compiled C code needs it * removed call_absolute() * removed optimization flag, as it was unused * rewrote pragma handling to work off of a table for easier addition of pragmas * added #pragma no_whatever which turns off the effect of #pragma whatever * added program argument types to md.c's list of permanent blocks; not checked for leakage yet tho