diff -cNr -x .vimrc v22.2b11/ChangeLog.alpha v22.2b12/ChangeLog.alpha *** v22.2b11/ChangeLog.alpha Sun Aug 13 23:27:28 2000 --- v22.2b12/ChangeLog.alpha Mon Jan 28 06:03:31 2002 *************** *** 1,7 **** ------------------------------------------------------------- (v22.2a37 promoted to v22.2b1) ! Sat Jul 29 21:32:05 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a37 * updated with respect to v22.1b32 * fixed miscellaneous typos and compile errors in a36 --- 1,7 ---- ------------------------------------------------------------- (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 *************** *** 19,25 **** 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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a36 * updated with respect to v22.1b31 * fixed process_input() so that the modified command is passed --- 19,25 ---- 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 *************** *** 35,41 **** 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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a35 * updated with respect to v22.1b30 * fixed escape_command() so that ! command escaping --- 35,41 ---- 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 *************** *** 46,52 **** * removed recently added debug checks for destructed objects pushed onto/assigned into the stack. ! Sun Jul 2 19:00:55 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a34 * updated with respect to v22.1b29 * fixed lower_case() and upper_case(), both broken in a32 by --- 46,52 ---- * 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 *************** *** 70,83 **** 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 (mmessier@prilnari.com (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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a32 * updated with respect to v22.1b28 * for the network_stats() contrib efun, return the external ports with --- 70,83 ---- 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 *************** *** 92,98 **** 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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a31 * updated with respect to v22.1b27 * added extensive packet/volume statistic gathering to comm.c and --- 92,98 ---- 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 *************** *** 104,117 **** . 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 (mmessier@prilnari.com (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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a29 * updated with respect to v22.1b26 * handle backspace in user input because some clients send everything --- 104,117 ---- . 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 *************** *** 138,144 **** * 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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a28 * updated with respect to v22.1b25 * rewrote user command handling in comm.c: --- 138,144 ---- * 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: *************** *** 164,170 **** * 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 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2a27 * updated with respect to v22.1b24 * fixed (s)printf() to be re-entrant. This allows for the removal --- 164,170 ---- * 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 diff -cNr -x .vimrc v22.2b11/ChangeLog.beta v22.2b12/ChangeLog.beta *** v22.2b11/ChangeLog.beta Fri Mar 30 17:14:07 2001 --- v22.2b12/ChangeLog.beta Thu Feb 7 18:39:49 2002 *************** *** 1,4 **** ! Fri Mar 30 17:14:07 2001 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b11 * #143: Fixed crashes when destructing various objects involved in APPLY_INIT calls. Based on patches from Mark G. Adams --- 1,24 ---- ! Thu Feb 7 18:39:16 2002 (marius@mduso.org (Marius)) ! * raised patchlevel to v22.2b12 ! * #152: Fixed a crasher using nested references. Fix supplied ! by Avenger@AtP. ! * #153: Fixed crasher in debug builds with an invalid assert. ! [reported by Pickett@Sumu] ! * #159, #162: Fixed a crasher in repeat_string() when the max ! string length is exceeded [reported by Eleinor@Arkansia] ! * Ported to Mac OS X (Darwin) ! * #166: this_player() will now always be this_object() when ! the net_dead apply is called from remove_interactive(). This ! should fix the write() oddities reported by Uranus. I'm not ! labelling this as a COMPAT BUSTER because previously there was ! no guarantee what this_player() would be. ! * #165: pluralizing -ff words gives incorrect -fves suffix ! [reported by Avenger@AtP] ! * #161: everyone can see hidden object in named_livings() and ! heart_beats(). Applied the fixes suggested by Ben Hoogterp. ! [reported by Eleinor@Arkansia] ! ! Fri Mar 30 17:14:07 2001 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b11 * #143: Fixed crashes when destructing various objects involved in APPLY_INIT calls. Based on patches from Mark G. Adams *************** *** 23,29 **** of string in 'locals'. Should be fixed up now [reported by Javelin@Vincent's Hollow] ! Mon Feb 12 16:09:42 2001 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b10 * #129: Added SLC_NAMELIST to the telnet.h included with MudOS for broken systems that are missing --- 43,49 ---- of string in 'locals'. Should be fixed up now [reported by Javelin@Vincent's Hollow] ! Mon Feb 12 16:09:42 2001 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b10 * #129: Added SLC_NAMELIST to the telnet.h included with MudOS for broken systems that are missing *************** *** 43,49 **** letter. Successive characters may be digits [reported by Arren@Anarres II] ! Mon Nov 6 18:48:25 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b9 * #104: Corrected the spelling of "ninth" which is used by the parse_sentence() efun. [reported by lundberg@vr.net] --- 63,69 ---- letter. Successive characters may be digits [reported by Arren@Anarres II] ! Mon Nov 6 18:48:25 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b9 * #104: Corrected the spelling of "ninth" which is used by the parse_sentence() efun. [reported by lundberg@vr.net] *************** *** 61,67 **** will run, and the time will continue to advance. This is a bug that is older than old [reported by Scatter] ! Wed Sep 27 08:20:05 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b8 * #83: Fixed get_char() when GET_CHAR_IS_BUFFERED is enabled. Make sure that the string returned is null terminated and --- 81,87 ---- will run, and the time will continue to advance. This is a bug that is older than old [reported by Scatter] ! Wed Sep 27 08:20:05 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b8 * #83: Fixed get_char() when GET_CHAR_IS_BUFFERED is enabled. Make sure that the string returned is null terminated and *************** *** 86,92 **** * #81: Filled in missing definitions for reference support for LPC_TO_C [reported by Uranus] ! Thu Sep 21 14:16:49 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b7 * #75: Fixed a typo in C_TRANSFER_LOCAL macro added in v22.2b6 [reported by Uranus] --- 106,112 ---- * #81: Filled in missing definitions for reference support for LPC_TO_C [reported by Uranus] ! Thu Sep 21 14:16:49 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b7 * #75: Fixed a typo in C_TRANSFER_LOCAL macro added in v22.2b6 [reported by Uranus] *************** *** 103,109 **** has been modified (in addition to driver, includes, config, etc.) [from Bugs] ! Mon Sep 18 20:19:20 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b6 * #57: Fixed a problem with single quotes inside of a macro expansion [reported by Mystic] --- 123,129 ---- has been modified (in addition to driver, includes, config, etc.) [from Bugs] ! Mon Sep 18 20:19:20 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b6 * #57: Fixed a problem with single quotes inside of a macro expansion [reported by Mystic] *************** *** 123,129 **** * #50: Fixed a crasher with recursive inherits deeper than the maximum call depth [reported by Beyond] ! Sat Sep 9 16:16:54 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b5 * #16: 'ref' works in foreach again [originally reported by Uranus] --- 143,149 ---- * #50: Fixed a crasher with recursive inherits deeper than the maximum call depth [reported by Beyond] ! Sat Sep 9 16:16:54 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b5 * #16: 'ref' works in foreach again [originally reported by Uranus] *************** *** 141,147 **** now is that comments are not considered whitespace everywhere that they should be. ! Sat Sep 2 09:40:38 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b4 * updated with respect to v22.1pre4 * #40: Fixed compilation error in add_action.c [reported by --- 161,167 ---- now is that comments are not considered whitespace everywhere that they should be. ! Sat Sep 2 09:40:38 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b4 * updated with respect to v22.1pre4 * #40: Fixed compilation error in add_action.c [reported by *************** *** 159,165 **** end result is the same -- at least it's supposed to be. 1 works, -1 doesn't. [reported by Zifnab@Red Dragon] ! Mon Aug 28 08:16:50 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b3 * updated with respect to v22.1pre3 * #15: Picked up the fix from v22.1pre2 that was missed in the --- 179,185 ---- end result is the same -- at least it's supposed to be. 1 works, -1 doesn't. [reported by Zifnab@Red Dragon] ! Mon Aug 28 08:16:50 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b3 * updated with respect to v22.1pre3 * #15: Picked up the fix from v22.1pre2 that was missed in the *************** *** 175,181 **** freed properly when the object is deallocated [reported by Uranus] ! Wed Aug 23 05:08:05 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b2 * updated with respect to v22.1pre2 * #4: fixed a problem with using the third defined class in an --- 195,201 ---- freed properly when the object is deallocated [reported by Uranus] ! Wed Aug 23 05:08:05 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b2 * updated with respect to v22.1pre2 * #4: fixed a problem with using the third defined class in an *************** *** 190,196 **** * #23: Corrected arguments passed to compile_object() master apply when cloning a virtual object [reported by Uranus] ! Sun Aug 13 22:25:28 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.2b1 * updated with respect to v22.1pre1 * fixed a memory leak with MUD port external ports leaking --- 210,216 ---- * #23: Corrected arguments passed to compile_object() master apply when cloning a virtual object [reported by Uranus] ! Sun Aug 13 22:25:28 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.2b1 * updated with respect to v22.1pre1 * fixed a memory leak with MUD port external ports leaking *************** *** 236,242 **** assorted nonsense [reported by Mystic] ----------------------------------------------------------------------- ! Wed Aug 30 18:58:56 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1pre4 * Backported a fix from v22.2a24 for add_slash() to not prepend a slash when the filename is '' --- 256,262 ---- assorted nonsense [reported by Mystic] ----------------------------------------------------------------------- ! Wed Aug 30 18:58:56 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1pre4 * Backported a fix from v22.2a24 for add_slash() to not prepend a slash when the filename is '' *************** *** 248,254 **** * #30: Fixed a problem with marking references for objects in sentences with get_char() and input_to() [reported by Uranus] ! Mon Aug 28 08:11:42 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1pre3 * Check for INADDR_NONE is now done in edit_source rather than on os specific check in portability.h. [suggested by Beek] --- 268,274 ---- * #30: Fixed a problem with marking references for objects in sentences with get_char() and input_to() [reported by Uranus] ! Mon Aug 28 08:11:42 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1pre3 * Check for INADDR_NONE is now done in edit_source rather than on os specific check in portability.h. [suggested by Beek] *************** *** 278,284 **** in the sentence chain for command_giver and returning 1 from the function. [reported by Loriel@NS and Uranus] ! Wed Aug 23 04:59:44 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1pre2 * #1: fixed compilation error on Solaris where INADDR_NONE is not defined in system headers [reported by Dvarsk@Nightmare] --- 298,304 ---- in the sentence chain for command_giver and returning 1 from the function. [reported by Loriel@NS and Uranus] ! Wed Aug 23 04:59:44 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1pre2 * #1: fixed compilation error on Solaris where INADDR_NONE is not defined in system headers [reported by Dvarsk@Nightmare] *************** *** 311,317 **** apply restriction to be lifted. Fixes error handler crashes [reported by Zifnab@Red Dragon] ! Wed Aug 13 22:03:44 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1pre1 * patched a memory leak with MUD type LPC sockets leaking arrays/strings/mappings/classes received. --- 331,337 ---- apply restriction to be lifted. Fixes error handler crashes [reported by Zifnab@Red Dragon] ! Wed Aug 13 22:03:44 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1pre1 * patched a memory leak with MUD type LPC sockets leaking arrays/strings/mappings/classes received. *************** *** 332,338 **** * more fixes to socket efuns to help prevent hangs on FreeBSD when a socket closes unexpectedly. ! Sat Jul 29 21:30:19 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b32 * fixed a crasher with reclaim_objects() and function pointers introduced in b31 [reported by Skullslayer@RoD] --- 352,358 ---- * more fixes to socket efuns to help prevent hangs on FreeBSD when a socket closes unexpectedly. ! Sat Jul 29 21:30:19 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b32 * fixed a crasher with reclaim_objects() and function pointers introduced in b31 [reported by Skullslayer@RoD] *************** *** 348,354 **** * display a more appropriate error message when the global include file cannot be included for some reason [reported by Mystic] ! Fri Jul 7 20:43:00 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b31 * objectp() efun now returns 0 for a destructed object [reported by Ehan@MedievalTimes] --- 368,374 ---- * display a more appropriate error message when the global include file cannot be included for some reason [reported by Mystic] ! Fri Jul 7 20:43:00 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b31 * objectp() efun now returns 0 for a destructed object [reported by Ehan@MedievalTimes] *************** *** 372,378 **** * fixed crasher when MAX_NUM_OBJECTS objects are found by the parser using plural modifier [reported by Dvarsk@Nightmare] ! Tue Jul 4 19:36:09 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b30 * virtual objects can be cloned again * moved STACK_INC into interpret.h from interpret.c so --- 392,398 ---- * fixed crasher when MAX_NUM_OBJECTS objects are found by the parser using plural modifier [reported by Dvarsk@Nightmare] ! Tue Jul 4 19:36:09 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b30 * virtual objects can be cloned again * moved STACK_INC into interpret.h from interpret.c so *************** *** 395,401 **** caused by a bad call to free_object() when dereferencing a class member that held a destructed object ! Sat Jul 1 13:14:32 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b29 * various fixes from Alaron@RetroMud: . make db.c compile --- 415,421 ---- caused by a bad call to free_object() when dereferencing a class member that held a destructed object ! Sat Jul 1 13:14:32 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b29 * various fixes from Alaron@RetroMud: . make db.c compile *************** *** 425,431 **** undefined class name and attempting to create an instance of an undefined class with new() ! Tue Jun 20 18:40:18 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b28 * fixed the changes made to ed in the last revision. Turrican's patches were merged in wrong. --- 445,451 ---- undefined class name and attempting to create an instance of an undefined class with new() ! Tue Jun 20 18:40:18 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b28 * fixed the changes made to ed in the last revision. Turrican's patches were merged in wrong. *************** *** 447,453 **** * raise class redefinition error only if member names and/or types differ [reported by Pinkfish@Discworld] ! Thu Jun 15 17:07:32 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b27 * if ARGUMENTS_IN_TRACEBACK or LOCALS_IN_TRACEBACK is defined, save error context in dump_trace() so as to maintain a consistent state if --- 467,473 ---- * raise class redefinition error only if member names and/or types differ [reported by Pinkfish@Discworld] ! Thu Jun 15 17:07:32 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b27 * if ARGUMENTS_IN_TRACEBACK or LOCALS_IN_TRACEBACK is defined, save error context in dump_trace() so as to maintain a consistent state if *************** *** 478,484 **** * fix another crasher returning from a catch { ... } block [reported by Mystic] ! Mon Jun 12 08:46:33 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b26 * don't shut down the driver if a new connection fails to set non-blocking on linux, just dump the connection and move on --- 498,504 ---- * fix another crasher returning from a catch { ... } block [reported by Mystic] ! Mon Jun 12 08:46:33 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b26 * don't shut down the driver if a new connection fails to set non-blocking on linux, just dump the connection and move on *************** *** 501,507 **** * correct index to local variable for warning about unused local variables [reported by Andrew@Nanvaent] ! Mon Jun 5 13:05:02 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b25 * several fixes to the terminal_colour() contrib efun: . bad stack/crash when string contains only %^'s --- 521,527 ---- * correct index to local variable for warning about unused local variables [reported by Andrew@Nanvaent] ! Mon Jun 5 13:05:02 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b25 * several fixes to the terminal_colour() contrib efun: . bad stack/crash when string contains only %^'s *************** *** 529,535 **** * added exceptions for plum and virus in the contrib efun pluralize(). [reported by Avenger@AtP] ! Wed May 24 12:00:20 CDT 2000 (mmessier@prilnari.com (Marius)) * raised patchlevel to v22.1b24 * updated contact information for reporting bugs * remove undefined status with += when rhs is real (completes --- 549,555 ---- * added exceptions for plum and virus in the contrib efun pluralize(). [reported by Avenger@AtP] ! Wed May 24 12:00:20 CDT 2000 (marius@mudos.org (Marius)) * raised patchlevel to v22.1b24 * updated contact information for reporting bugs * remove undefined status with += when rhs is real (completes diff -cNr -x .vimrc v22.2b11/Platforms v22.2b12/Platforms *** v22.2b11/Platforms Thu Aug 31 06:54:20 2000 --- v22.2b12/Platforms Mon Jan 28 06:03:16 2002 *************** *** 21,28 **** IBM PC (NetBSD, FreeBSD, 386BSD, etc.) IBM PC (Windows 95/NT using Visual C++; see the windows/ subdirectory) Amiga (AmigaDOS using the LATTICE C or SAS/C compiler, or Linux, or gcc) ! *Send mail to mmessier@prilnari.com if you experience any problems compiling or running on these systems. Note that some of these machines have old versions of yacc and do require bison (a yacc replacement) to compile MudOS correctly. If you manage to compile and run MudOS on a system other --- 21,29 ---- IBM PC (NetBSD, FreeBSD, 386BSD, etc.) IBM PC (Windows 95/NT using Visual C++; see the windows/ subdirectory) Amiga (AmigaDOS using the LATTICE C or SAS/C compiler, or Linux, or gcc) + Macintosh OS X (Darwin) ! *Send mail to marius@mudos.org if you experience any problems compiling or running on these systems. Note that some of these machines have old versions of yacc and do require bison (a yacc replacement) to compile MudOS correctly. If you manage to compile and run MudOS on a system other diff -cNr -x .vimrc v22.2b11/arch.h v22.2b12/arch.h *** v22.2b11/arch.h Thu Aug 10 00:28:13 2000 --- v22.2b12/arch.h Sun Jul 15 23:37:23 2001 *************** *** 133,138 **** --- 133,142 ---- #define ARCH "Amiga" #endif + #if !defined(ARCH) && defined(__APPLE__) && defined(__GNUC__) + #define ARCH "Mac OS X" + #endif + #ifndef ARCH #define ARCH "unknown architecture" #endif diff -cNr -x .vimrc v22.2b11/backend.c v22.2b12/backend.c *** v22.2b11/backend.c Wed Dec 13 17:15:42 2000 --- v22.2b12/backend.c Mon Jan 28 08:17:52 2002 *************** *** 691,707 **** #ifdef F_HEART_BEATS array_t *get_heart_beats() { ! int n = num_hb_objs; heart_beat_t *hb = heart_beats; array_t *arr; ! ! arr = allocate_empty_array(n); while (n--) { arr->item[n].type = T_OBJECT; ! arr->item[n].u.ob = hb->ob; ! add_ref(hb->ob, "get_heart_beats"); ! hb++; } return arr; } #endif --- 691,728 ---- #ifdef F_HEART_BEATS array_t *get_heart_beats() { ! int nob = 0, n = num_hb_objs; heart_beat_t *hb = heart_beats; + object_t **obtab; array_t *arr; ! #ifdef F_SET_HIDE ! int apply_valid_hide = 1, display_hidden = 0; ! #endif ! ! obtab = CALLOCATE(n, object_t *, TAG_TEMPORARY, "heart_beats"); while (n--) { + #ifdef F_SET_HIDE + if (hb->ob->flags & O_HIDDEN) { + if (apply_valid_hide) { + apply_valid_hide = 0; + display_hidden = valid_hide(current_object); + } + if (!display_hidden) + continue; + } + #endif + obtab[nob++] = (hb++)->ob; + } + + arr = allocate_empty_array(nob); + while (nob--) { arr->item[n].type = T_OBJECT; ! arr->item[n].u.ob = obtab[nob]; ! add_ref(arr->item[nob].u.ob, "get_heart_beats"); } + + FREE(obtab); + return arr; } #endif diff -cNr -x .vimrc v22.2b11/build.MudOS v22.2b12/build.MudOS *** v22.2b11/build.MudOS Mon Sep 18 14:18:50 2000 --- v22.2b12/build.MudOS Sun Jul 15 23:37:47 2001 *************** *** 129,134 **** --- 129,139 ---- echo "Trying out some stuff to see what works; ignore errors ..." + # Mac OS X needs this in order to build properly + if test "`uname`" = "Darwin"; then + NEED_OLD_CPP=-traditional-cpp + fi + # # Figure out what make is, and how to invoke it # diff -cNr -x .vimrc v22.2b11/comm.c v22.2b12/comm.c *** v22.2b11/comm.c Sat Oct 21 12:02:07 2000 --- v22.2b12/comm.c Sun Jul 22 14:40:21 2001 *************** *** 1369,1376 **** * set fd's for efun sockets. */ for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state != CLOSED) { ! if (lpc_socks[i].state != FLUSHING && (lpc_socks[i].flags & S_WACCEPT) == 0) FD_SET(lpc_socks[i].fd, &readmask); if (lpc_socks[i].flags & S_BLOCKED) --- 1369,1376 ---- * set fd's for efun sockets. */ for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state != STATE_CLOSED) { ! if (lpc_socks[i].state != STATE_FLUSHING && (lpc_socks[i].flags & S_WACCEPT) == 0) FD_SET(lpc_socks[i].fd, &readmask); if (lpc_socks[i].flags & S_BLOCKED) *************** *** 1421,1430 **** * check for data pending on efun socket connections. */ for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state != CLOSED) if (FD_ISSET(lpc_socks[i].fd, &readmask)) socket_read_select_handler(i); ! if (lpc_socks[i].state != CLOSED) if (FD_ISSET(lpc_socks[i].fd, &writemask)) socket_write_select_handler(i); } --- 1421,1430 ---- * check for data pending on efun socket connections. */ for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state != STATE_CLOSED) if (FD_ISSET(lpc_socks[i].fd, &readmask)) socket_read_select_handler(i); ! if (lpc_socks[i].state != STATE_CLOSED) if (FD_ISSET(lpc_socks[i].fd, &writemask)) socket_write_select_handler(i); } *************** *** 1916,1922 **** --- 1916,1924 ---- /* * auto-notification of net death */ + save_command_giver(ob); safe_apply(APPLY_NET_DEAD, ob, 0, ORIGIN_DRIVER); + restore_command_giver(); } #ifndef NO_SNOOP *************** *** 2553,2567 **** /* assume it's going to grow some more */ limit = (outbuf->real_size + l) * 2; if (limit > USHRT_MAX) { ! limit = outbuf->real_size + l; ! if (limit > USHRT_MAX) { ! outbuf->buffer = extend_string(outbuf->buffer, USHRT_MAX); ! return USHRT_MAX - outbuf->real_size; ! } } outbuf->buffer = extend_string(outbuf->buffer, limit); } } else { outbuf->buffer = new_string(l, "outbuf_add"); outbuf->real_size = 0; } --- 2555,2568 ---- /* assume it's going to grow some more */ limit = (outbuf->real_size + l) * 2; if (limit > USHRT_MAX) { ! limit = USHRT_MAX; ! outbuf->buffer = extend_string(outbuf->buffer, USHRT_MAX); ! return USHRT_MAX - outbuf->real_size; } outbuf->buffer = extend_string(outbuf->buffer, limit); } } else { + l = (l > USHRT_MAX ? USHRT_MAX : l); outbuf->buffer = new_string(l, "outbuf_add"); outbuf->real_size = 0; } *************** *** 2574,2605 **** if (!outbuf) return; l = strlen(str); ! if (outbuf->buffer) { ! limit = MSTR_SIZE(outbuf->buffer); ! if (outbuf->real_size + l > limit) { ! if (outbuf->real_size == USHRT_MAX) return; /* TRUNCATED */ ! ! /* assume it's going to grow some more */ ! limit = (outbuf->real_size + l) * 2; ! if (limit > USHRT_MAX) { ! limit = outbuf->real_size + l; ! if (limit > USHRT_MAX) { ! outbuf->buffer = extend_string(outbuf->buffer, USHRT_MAX); ! strncpy(outbuf->buffer + outbuf->real_size, str, ! USHRT_MAX - outbuf->real_size); ! outbuf->buffer[USHRT_MAX] = 0; ! outbuf->real_size = USHRT_MAX; ! return; ! } ! } ! outbuf->buffer = extend_string(outbuf->buffer, limit); ! } ! } else { ! outbuf->buffer = new_string(l, "outbuf_add"); ! outbuf->real_size = 0; ! } ! strcpy(outbuf->buffer + outbuf->real_size, str); ! outbuf->real_size += l; } void outbuf_addchar P2(outbuffer_t *, outbuf, char, c) --- 2575,2584 ---- if (!outbuf) return; l = strlen(str); ! limit = outbuf_extend(outbuf, l); ! strncpy(outbuf->buffer + outbuf->real_size, str, limit); ! outbuf->real_size += (l > limit ? limit : l); ! *(outbuf->buffer + outbuf->real_size) = 0; } void outbuf_addchar P2(outbuffer_t *, outbuf, char, c) *************** *** 2607,2636 **** int limit; if (!outbuf) return; ! ! if (outbuf->buffer) { ! limit = MSTR_SIZE(outbuf->buffer); ! if (outbuf->real_size + 1 > limit) { ! if (outbuf->real_size == USHRT_MAX) return; /* TRUNCATED */ ! ! /* assume it's going to grow some more */ ! limit = (outbuf->real_size + 1) * 2; ! if (limit > USHRT_MAX) { ! limit = outbuf->real_size + 1; ! if (limit > USHRT_MAX) { ! outbuf->buffer = extend_string(outbuf->buffer, USHRT_MAX); ! *(outbuf->buffer + outbuf->real_size) = c; ! outbuf->buffer[USHRT_MAX] = 0; ! outbuf->real_size = USHRT_MAX; ! return; ! } ! } ! outbuf->buffer = extend_string(outbuf->buffer, limit); ! } ! } else { ! outbuf->buffer = new_string(80, "outbuf_add"); ! outbuf->real_size = 0; ! } *(outbuf->buffer + outbuf->real_size++) = c; *(outbuf->buffer + outbuf->real_size) = 0; } --- 2586,2592 ---- int limit; if (!outbuf) return; ! limit = outbuf_extend(outbuf, 1); *(outbuf->buffer + outbuf->real_size++) = c; *(outbuf->buffer + outbuf->real_size) = 0; } diff -cNr -x .vimrc v22.2b11/crypt.c v22.2b12/crypt.c *** v22.2b11/crypt.c Thu Aug 10 00:28:13 2000 --- v22.2b12/crypt.c Sun Jul 22 14:32:43 2001 *************** *** 57,69 **** /* MIRROR: inverts the order of bytes in a 32-bit quantity, if * necessary. ! * Define this to be empty on little-endian systems: * #define MIRROR(l) ! * And for big-endian systems something like: * #define MIRROR(l) ( (l) = ( ((l) << 24) | (((l) & 0x0000ff00) << 8) | (((l) & 0x00ff0000) >> 8) | ((l) >> 24) ) ) */ #define MIRROR(l) ( (l) = ( ((l) << 24) | (((l) & 0x0000ff00) << 8) | (((l) & 0x00ff0000) >> 8) | ((l) >> 24) ) ) /* Functions F, G, H and I as mentioned in RFC, section 3.4. */ --- 57,73 ---- /* MIRROR: inverts the order of bytes in a 32-bit quantity, if * necessary. ! * Define this to be empty on big-endian systems: * #define MIRROR(l) ! * And for little-endian systems something like: * #define MIRROR(l) ( (l) = ( ((l) << 24) | (((l) & 0x0000ff00) << 8) | (((l) & 0x00ff0000) >> 8) | ((l) >> 24) ) ) */ + #ifdef BIGENDIAN + #define MIRROR(l) + #else #define MIRROR(l) ( (l) = ( ((l) << 24) | (((l) & 0x0000ff00) << 8) | (((l) & 0x00ff0000) >> 8) | ((l) >> 24) ) ) + #endif /* Functions F, G, H and I as mentioned in RFC, section 3.4. */ diff -cNr -x .vimrc v22.2b11/ed.c v22.2b12/ed.c *** v22.2b11/ed.c Sat Sep 2 10:04:06 2000 --- v22.2b12/ed.c Mon Jan 28 08:05:07 2002 *************** *** 2662,2667 **** --- 2662,2670 ---- char *object_ed_start P3(object_t *, ob, char *, fname, int, restricted) { svalue_t *setup; + /* ensure that the result buffer is initialized */ + outbuf_zero(¤t_ed_results); + regexp_user = ED_REGEXP; current_ed_buffer = add_ed_buffer(ob); diff -cNr -x .vimrc v22.2b11/edit_source.c v22.2b12/edit_source.c *** v22.2b11/edit_source.c Mon Feb 12 14:04:23 2001 --- v22.2b12/edit_source.c Sun Jul 22 14:35:49 2001 *************** *** 1316,1321 **** --- 1316,1337 ---- return 0; } + static int check_code P2(char *, pre, char *, code) { + char buf[1024]; + FILE *ct; + int rc; + + ct = fopen("comptest.c", "w"); + fprintf(ct, "#include \"configure.h\"\n#include \"std_incl.h\"\n%s\n\nint main() {%s}\n", (pre ? pre : ""), code); + fclose(ct); + + sprintf(buf, "%s %s comptest.c -o comptest" TO_DEV_NULL, COMPILER, CFLAGS); + if (compile(buf) || (rc = system("./comptest")) == 127 || rc == -1) { + return -1; + } + return rc; + } + static void check_linux_libc() { char buf[1024]; FILE *ct; *************** *** 1533,1538 **** --- 1549,1562 ---- "", "gettimeofday(0, 0);", 0); verbose_check_prog("Checking for fchmod()", "HAS_FCHMOD", "", "fchmod(0, 0);", 0); + + printf("Checking for big or little endian ... "); + if (!check_code("char num[] = { 0x11, 0x22, 0x33, 0x44 }; int *foo = (int *)num;", + "return (*foo == 0x44332211);")) { + printf("big\n"); + fprintf(yyout, "#define BIGENDIAN 1"); + fflush(yyout); + } else printf("little\n"); find_memmove(); #endif diff -cNr -x .vimrc v22.2b11/interpret.c v22.2b12/interpret.c *** v22.2b11/interpret.c Fri Mar 30 05:20:42 2001 --- v22.2b12/interpret.c Mon May 14 05:19:17 2001 *************** *** 564,570 **** { DEBUG_CHECK(from == 0, "Attempt to assign_svalue() from a null ptr.\n"); DEBUG_CHECK(to == 0, "Attempt to assign_svalue() to a null ptr.\n"); ! DEBUG_CHECK(from->type & (from->type - 1), "from->type is corrupt; >1 bit set.\n"); if (from->type == T_OBJECT && (!from->u.ob || (from->u.ob->flags & O_DESTRUCTED))) { *to = const0u; --- 564,570 ---- { DEBUG_CHECK(from == 0, "Attempt to assign_svalue() from a null ptr.\n"); DEBUG_CHECK(to == 0, "Attempt to assign_svalue() to a null ptr.\n"); ! DEBUG_CHECK((from->type & (from->type - 1)) & ~T_FREED, "from->type is corrupt; >1 bit set.\n"); if (from->type == T_OBJECT && (!from->u.ob || (from->u.ob->flags & O_DESTRUCTED))) { *to = const0u; *************** *** 1970,1976 **** */ ref = make_ref(); ref->lvalue = sp->u.lvalue; ! if (op != F_GLOBAL_LVALUE && op != F_LOCAL_LVALUE) { ref->sv.type = lv_owner_type; ref->sv.subtype = STRING_MALLOC; /* ignored if non-string */ if (lv_owner_type == T_STRING) { --- 1970,1976 ---- */ ref = make_ref(); ref->lvalue = sp->u.lvalue; ! if (op != F_GLOBAL_LVALUE && op != F_LOCAL_LVALUE && op != F_REF_LVALUE) { ref->sv.type = lv_owner_type; ref->sv.subtype = STRING_MALLOC; /* ignored if non-string */ if (lv_owner_type == T_STRING) { diff -cNr -x .vimrc v22.2b11/packages/contrib.c v22.2b12/packages/contrib.c *** v22.2b11/packages/contrib.c Mon Nov 6 18:14:36 2000 --- v22.2b12/packages/contrib.c Mon Jan 28 08:14:36 2002 *************** *** 42,48 **** int i; int nob; #ifdef F_SET_HIDE ! int apply_valid_hide, hide_is_valid = 0; #endif object_t *ob, **obtab; array_t *vec; --- 42,48 ---- int i; int nob; #ifdef F_SET_HIDE ! int apply_valid_hide, display_hidden = 0; #endif object_t *ob, **obtab; array_t *vec; *************** *** 62,70 **** if (ob->flags & O_HIDDEN) { if (apply_valid_hide) { apply_valid_hide = 0; ! hide_is_valid = valid_hide(current_object); } ! if (hide_is_valid) continue; } #endif --- 62,70 ---- if (ob->flags & O_HIDDEN) { if (apply_valid_hide) { apply_valid_hide = 0; ! display_hidden = valid_hide(current_object); } ! if (!display_hidden) continue; } #endif *************** *** 1139,1145 **** case 'F': case 'f': if (end[-2] == 'e' || end[-2] == 'E') break; ! found = PLURAL_CHOP + 1; suffix = "ves"; break; case 'H': case 'h': --- 1139,1145 ---- case 'F': case 'f': if (end[-2] == 'e' || end[-2] == 'E') break; ! found = PLURAL_CHOP + 2; suffix = "ves"; break; case 'H': case 'h': *************** *** 1660,1679 **** #ifdef F_REPEAT_STRING void f_repeat_string PROT((void)) { char *str; ! int repeat, len; char *ret, *p; int i; repeat = (sp--)->u.number; if (repeat <= 0) { free_string_svalue(sp); sp->type = T_STRING; sp->subtype = STRING_CONSTANT; sp->u.string = ""; } else if (repeat != 1) { ! str = sp->u.string; ! len = SVALUE_STRLEN(sp); ! p = ret = new_string(len * repeat, "f_repeat_string"); for (i = 0; i < repeat; i++) { memcpy(p, str, len); p += len; --- 1660,1683 ---- #ifdef F_REPEAT_STRING void f_repeat_string PROT((void)) { char *str; ! int repeat, len, newlen; char *ret, *p; int i; repeat = (sp--)->u.number; + if (repeat > 0) { + str = sp->u.string; + len = SVALUE_STRLEN(sp); + if ((newlen = len * repeat) > max_string_length) + repeat = max_string_length / len; + } if (repeat <= 0) { free_string_svalue(sp); sp->type = T_STRING; sp->subtype = STRING_CONSTANT; sp->u.string = ""; } else if (repeat != 1) { ! p = ret = new_string(newlen, "f_repeat_string"); for (i = 0; i < repeat; i++) { memcpy(p, str, len); p += len; diff -cNr -x .vimrc v22.2b11/packages/external.c v22.2b12/packages/external.c *** v22.2b11/packages/external.c Thu Aug 10 00:28:13 2000 --- v22.2b12/packages/external.c Sun Jul 15 23:37:23 2001 *************** *** 37,43 **** set_close_callback(fd, arg3); lpc_socks[fd].owner_ob = current_object; lpc_socks[fd].mode = STREAM; ! lpc_socks[fd].state = DATA_XFER; memset((char *) &lpc_socks[fd].l_addr, 0, sizeof(lpc_socks[fd].l_addr)); memset((char *) &lpc_socks[fd].r_addr, 0, sizeof(lpc_socks[fd].r_addr)); lpc_socks[fd].owner_ob = current_object; --- 37,43 ---- set_close_callback(fd, arg3); lpc_socks[fd].owner_ob = current_object; lpc_socks[fd].mode = STREAM; ! lpc_socks[fd].state = STATE_DATA_XFER; memset((char *) &lpc_socks[fd].l_addr, 0, sizeof(lpc_socks[fd].l_addr)); memset((char *) &lpc_socks[fd].r_addr, 0, sizeof(lpc_socks[fd].r_addr)); lpc_socks[fd].owner_ob = current_object; diff -cNr -x .vimrc v22.2b11/patchlevel.h v22.2b12/patchlevel.h *** v22.2b11/patchlevel.h Fri Mar 30 17:14:07 2001 --- v22.2b12/patchlevel.h Thu Feb 7 18:34:59 2002 *************** *** 1 **** ! #define PATCH_LEVEL "v22.2b11" --- 1 ---- ! #define PATCH_LEVEL "v22.2b12" diff -cNr -x .vimrc v22.2b11/simulate.c v22.2b12/simulate.c *** v22.2b11/simulate.c Wed Mar 28 12:15:29 2001 --- v22.2b12/simulate.c Sun Jul 15 23:37:23 2001 *************** *** 1917,1923 **** ipc_remove(); #if defined(PACKAGE_SOCKETS) || defined(PACKAGE_EXTERNAL) for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state == CLOSED) continue; while (OS_socket_close(lpc_socks[i].fd) == -1 && errno == EINTR) ; } --- 1917,1923 ---- ipc_remove(); #if defined(PACKAGE_SOCKETS) || defined(PACKAGE_EXTERNAL) for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state == STATE_CLOSED) continue; while (OS_socket_close(lpc_socks[i].fd) == -1 && errno == EINTR) ; } diff -cNr -x .vimrc v22.2b11/socket_efuns.c v22.2b12/socket_efuns.c *** v22.2b11/socket_efuns.c Sun Aug 27 01:40:51 2000 --- v22.2b12/socket_efuns.c Sun Jul 15 23:37:23 2001 *************** *** 67,73 **** lpc_socks[which].fd = -1; lpc_socks[which].flags = 0; lpc_socks[which].mode = MUD; ! lpc_socks[which].state = CLOSED; memset((char *) &lpc_socks[which].l_addr, 0, sizeof(lpc_socks[which].l_addr)); memset((char *) &lpc_socks[which].r_addr, 0, sizeof(lpc_socks[which].r_addr)); lpc_socks[which].owner_ob = NULL; --- 67,73 ---- lpc_socks[which].fd = -1; lpc_socks[which].flags = 0; lpc_socks[which].mode = MUD; ! lpc_socks[which].state = STATE_CLOSED; memset((char *) &lpc_socks[which].l_addr, 0, sizeof(lpc_socks[which].l_addr)); memset((char *) &lpc_socks[which].r_addr, 0, sizeof(lpc_socks[which].r_addr)); lpc_socks[which].owner_ob = NULL; *************** *** 203,209 **** int i; for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state == CLOSED) return i; } return more_lpc_sockets(); --- 203,209 ---- int i; for (i = 0; i < max_lpc_socks; i++) { ! if (lpc_socks[i].state == STATE_CLOSED) return i; } return more_lpc_sockets(); *************** *** 275,281 **** } #endif lpc_socks[i].mode = mode; ! lpc_socks[i].state = UNBOUND; memset((char *) &lpc_socks[i].l_addr, 0, sizeof(lpc_socks[i].l_addr)); memset((char *) &lpc_socks[i].r_addr, 0, sizeof(lpc_socks[i].r_addr)); lpc_socks[i].owner_ob = current_object; --- 275,281 ---- } #endif lpc_socks[i].mode = mode; ! lpc_socks[i].state = STATE_UNBOUND; memset((char *) &lpc_socks[i].l_addr, 0, sizeof(lpc_socks[i].l_addr)); memset((char *) &lpc_socks[i].r_addr, 0, sizeof(lpc_socks[i].r_addr)); lpc_socks[i].owner_ob = current_object; *************** *** 306,317 **** if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; ! if (lpc_socks[fd].state != UNBOUND) return EEISBOUND; sin.sin_family = AF_INET; --- 306,317 ---- if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; ! if (lpc_socks[fd].state != STATE_UNBOUND) return EEISBOUND; sin.sin_family = AF_INET; *************** *** 341,347 **** socket_perror("socket_bind: getsockname", 0); return EEGETSOCKNAME; } ! lpc_socks[fd].state = BOUND; debug(sockets, ("socket_bind: bound socket %d to %s.%d\n", fd, inet_ntoa(lpc_socks[fd].l_addr.sin_addr), --- 341,347 ---- socket_perror("socket_bind: getsockname", 0); return EEGETSOCKNAME; } ! lpc_socks[fd].state = STATE_BOUND; debug(sockets, ("socket_bind: bound socket %d to %s.%d\n", fd, inet_ntoa(lpc_socks[fd].l_addr.sin_addr), *************** *** 357,379 **** { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; ! if (lpc_socks[fd].state == UNBOUND) return EENOADDR; ! if (lpc_socks[fd].state != BOUND) return EEISCONN; if (listen(lpc_socks[fd].fd, 5) == -1) { socket_perror("socket_listen: listen", 0); return EELISTEN; } ! lpc_socks[fd].state = LISTEN; set_read_callback(fd, callback); current_object->flags |= O_EFUN_SOCKET; --- 357,379 ---- { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; ! if (lpc_socks[fd].state == STATE_UNBOUND) return EENOADDR; ! if (lpc_socks[fd].state != STATE_BOUND) return EEISCONN; if (listen(lpc_socks[fd].fd, 5) == -1) { socket_perror("socket_listen: listen", 0); return EELISTEN; } ! lpc_socks[fd].state = STATE_LISTEN; set_read_callback(fd, callback); current_object->flags |= O_EFUN_SOCKET; *************** *** 393,406 **** if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; ! if (lpc_socks[fd].state != LISTEN) return EENOTLISTN; lpc_socks[fd].flags &= ~S_WACCEPT; --- 393,406 ---- if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; ! if (lpc_socks[fd].state != STATE_LISTEN) return EENOTLISTN; lpc_socks[fd].flags &= ~S_WACCEPT; *************** *** 456,462 **** lpc_socks[i].flags |= S_BLOCKED; lpc_socks[i].mode = lpc_socks[fd].mode; ! lpc_socks[i].state = DATA_XFER; len = sizeof(sin); if (getsockname(lpc_socks[i].fd, (struct sockaddr *)&lpc_socks[i].l_addr, &len) == -1) { lpc_socks[i].l_addr = lpc_socks[fd].l_addr; --- 456,462 ---- lpc_socks[i].flags |= S_BLOCKED; lpc_socks[i].mode = lpc_socks[fd].mode; ! lpc_socks[i].state = STATE_DATA_XFER; len = sizeof(sin); if (getsockname(lpc_socks[i].fd, (struct sockaddr *)&lpc_socks[i].l_addr, &len) == -1) { lpc_socks[i].l_addr = lpc_socks[fd].l_addr; *************** *** 493,514 **** { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; switch (lpc_socks[fd].state) { ! case CLOSED: ! case FLUSHING: ! case UNBOUND: ! case BOUND: break; ! case LISTEN: return EEISLISTEN; ! case DATA_XFER: return EEISCONN; } --- 493,514 ---- { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; if (lpc_socks[fd].mode == DATAGRAM) return EEMODENOTSUPP; switch (lpc_socks[fd].state) { ! case STATE_CLOSED: ! case STATE_FLUSHING: ! case STATE_UNBOUND: ! case STATE_BOUND: break; ! case STATE_LISTEN: return EEISLISTEN; ! case STATE_DATA_XFER: return EEISCONN; } *************** *** 553,559 **** return EENONBLOCK; } #endif ! lpc_socks[fd].state = DATA_XFER; lpc_socks[fd].flags |= S_BLOCKED; return EESUCCESS; --- 553,559 ---- return EENONBLOCK; } #endif ! lpc_socks[fd].state = STATE_DATA_XFER; lpc_socks[fd].flags |= S_BLOCKED; return EESUCCESS; *************** *** 570,577 **** if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; --- 570,577 ---- if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; *************** *** 581,587 **** if (!socket_name_to_sin(name, &sin)) return EEBADADDR; } else { ! if (lpc_socks[fd].state != DATA_XFER) return EENOTCONN; if (name != NULL) return EEBADADDR; --- 581,587 ---- if (!socket_name_to_sin(name, &sin)) return EEBADADDR; } else { ! if (lpc_socks[fd].state != STATE_DATA_XFER) return EENOTCONN; if (name != NULL) return EEBADADDR; *************** *** 785,799 **** switch (lpc_socks[fd].state) { ! case CLOSED: ! case FLUSHING: return; ! case UNBOUND: debug_message("socket_read_select_handler: read on unbound socket %i\n"); break; ! case BOUND: switch (lpc_socks[fd].mode) { case MUD: --- 785,799 ---- switch (lpc_socks[fd].state) { ! case STATE_CLOSED: ! case STATE_FLUSHING: return; ! case STATE_UNBOUND: debug_message("socket_read_select_handler: read on unbound socket %i\n"); break; ! case STATE_BOUND: switch (lpc_socks[fd].mode) { case MUD: *************** *** 847,860 **** } break; ! case LISTEN: debug(sockets, ("read_socket_handler: apply read callback\n")); lpc_socks[fd].flags |= S_WACCEPT; push_number(fd); call_callback(fd, S_READ_FP, 1); return; ! case DATA_XFER: switch (lpc_socks[fd].mode) { case DATAGRAM: --- 847,860 ---- } break; ! case STATE_LISTEN: debug(sockets, ("read_socket_handler: apply read callback\n")); lpc_socks[fd].flags |= S_WACCEPT; push_number(fd); call_callback(fd, S_READ_FP, 1); return; ! case STATE_DATA_XFER: switch (lpc_socks[fd].mode) { case DATAGRAM: *************** *** 981,987 **** * they use this error message, I have no idea, but this seems * to work. */ ! if (lpc_socks[fd].state == BOUND && lpc_socks[fd].mode == DATAGRAM) return; break; --- 981,987 ---- * they use this error message, I have no idea, but this seems * to work. */ ! if (lpc_socks[fd].state == STATE_BOUND && lpc_socks[fd].mode == DATAGRAM) return; break; *************** *** 1028,1034 **** } lpc_socks[fd].flags |= S_LINKDEAD; ! if (lpc_socks[fd].state == FLUSHING) { lpc_socks[fd].flags &= ~S_BLOCKED; socket_close(fd, SC_FORCE | SC_FINAL_CLOSE); return; --- 1028,1034 ---- } lpc_socks[fd].flags |= S_LINKDEAD; ! if (lpc_socks[fd].state == STATE_FLUSHING) { lpc_socks[fd].flags &= ~S_BLOCKED; socket_close(fd, SC_FORCE | SC_FINAL_CLOSE); return; *************** *** 1053,1059 **** lpc_socks[fd].w_off = 0; } lpc_socks[fd].flags &= ~S_BLOCKED; ! if (lpc_socks[fd].state == FLUSHING) { socket_close(fd, SC_FORCE | SC_FINAL_CLOSE); return; } --- 1053,1059 ---- lpc_socks[fd].w_off = 0; } lpc_socks[fd].flags &= ~S_BLOCKED; ! if (lpc_socks[fd].state == STATE_FLUSHING) { socket_close(fd, SC_FORCE | SC_FINAL_CLOSE); return; } *************** *** 1071,1079 **** { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED) return EEBADF; ! if (lpc_socks[fd].state == FLUSHING && !(flags & SC_FINAL_CLOSE)) return EEBADF; if (!(flags & SC_FORCE) && lpc_socks[fd].owner_ob != current_object) return EESECURITY; --- 1071,1079 ---- { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED) return EEBADF; ! if (lpc_socks[fd].state == STATE_FLUSHING && !(flags & SC_FINAL_CLOSE)) return EEBADF; if (!(flags & SC_FORCE) && lpc_socks[fd].owner_ob != current_object) return EESECURITY; *************** *** 1093,1099 **** /* Can't close now; we still have data to write. Tell the mudlib * it is closed, but we really finish up later. */ ! lpc_socks[fd].state = FLUSHING; return EESUCCESS; } --- 1093,1099 ---- /* Can't close now; we still have data to write. Tell the mudlib * it is closed, but we really finish up later. */ ! lpc_socks[fd].state = STATE_FLUSHING; return EESUCCESS; } *************** *** 1118,1125 **** { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; --- 1118,1125 ---- { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if (lpc_socks[fd].owner_ob != current_object) return EESECURITY; *************** *** 1153,1160 **** { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return EEBADF; if ((lpc_socks[fd].flags & S_RELEASE) == 0) return EESOCKNOTRLSD; --- 1153,1160 ---- { if (fd < 0 || fd >= max_lpc_socks) return EEFDRANGE; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return EEBADF; if ((lpc_socks[fd].flags & S_RELEASE) == 0) return EESOCKNOTRLSD; *************** *** 1208,1215 **** { if (fd < 0 || fd >= max_lpc_socks) return (object_t *) NULL; ! if (lpc_socks[fd].state == CLOSED || ! lpc_socks[fd].state == FLUSHING) return (object_t *) NULL; return lpc_socks[fd].owner_ob; } --- 1208,1215 ---- { if (fd < 0 || fd >= max_lpc_socks) return (object_t *) NULL; ! if (lpc_socks[fd].state == STATE_CLOSED || ! lpc_socks[fd].state == STATE_FLUSHING) return (object_t *) NULL; return lpc_socks[fd].owner_ob; } *************** *** 1267,1274 **** for (i = 0; i < max_lpc_socks; i++) if (lpc_socks[i].owner_ob == ob && ! lpc_socks[i].state != CLOSED && ! lpc_socks[i].state != FLUSHING) socket_close(i, SC_FORCE); } --- 1267,1274 ---- for (i = 0; i < max_lpc_socks; i++) if (lpc_socks[i].owner_ob == ob && ! lpc_socks[i].state != STATE_CLOSED && ! lpc_socks[i].state != STATE_FLUSHING) socket_close(i, SC_FORCE); } diff -cNr -x .vimrc v22.2b11/socket_efuns.h v22.2b12/socket_efuns.h *** v22.2b11/socket_efuns.h Fri Aug 11 21:24:46 2000 --- v22.2b12/socket_efuns.h Sun Jul 15 23:37:23 2001 *************** *** 15,21 **** }; enum socket_state { ! CLOSED, FLUSHING, UNBOUND, BOUND, LISTEN, DATA_XFER }; #define BUF_SIZE 2048 /* max reliable packet size */ --- 15,21 ---- }; enum socket_state { ! STATE_CLOSED, STATE_FLUSHING, STATE_UNBOUND, STATE_BOUND, STATE_LISTEN, STATE_DATA_XFER }; #define BUF_SIZE 2048 /* max reliable packet size */ diff -cNr -x .vimrc v22.2b11/sprintf.c v22.2b12/sprintf.c *** v22.2b11/sprintf.c Fri Mar 30 03:38:49 2001 --- v22.2b12/sprintf.c Mon May 14 05:56:32 2001 *************** *** 132,139 **** * recover */ #define ADD_CHAR(x) {\ - outbuf_addchar(&(sprintf_state->obuff), x);\ if (sprintf_state->obuff.real_size == USHRT_MAX) ERROR(ERR_BUFF_OVERFLOW); \ } #define GET_NEXT_ARG {\ --- 132,139 ---- * recover */ #define ADD_CHAR(x) {\ if (sprintf_state->obuff.real_size == USHRT_MAX) ERROR(ERR_BUFF_OVERFLOW); \ + outbuf_addchar(&(sprintf_state->obuff), x);\ } #define GET_NEXT_ARG {\ *************** *** 512,518 **** char *p; int padlen; ! if (outbuf_extend(&(sprintf_state->obuff), len) != len) ERROR(ERR_BUFF_OVERFLOW); p = sprintf_state->obuff.buffer + sprintf_state->obuff.real_size; sprintf_state->obuff.real_size += len; --- 512,518 ---- char *p; int padlen; ! if (outbuf_extend(&(sprintf_state->obuff), len) < len) ERROR(ERR_BUFF_OVERFLOW); p = sprintf_state->obuff.buffer + sprintf_state->obuff.real_size; sprintf_state->obuff.real_size += len; *************** *** 539,545 **** } INLINE_STATIC void add_nstr P2(char *, str, int, len) { ! if (outbuf_extend(&(sprintf_state->obuff), len) != len) ERROR(ERR_BUFF_OVERFLOW); memcpy(sprintf_state->obuff.buffer + sprintf_state->obuff.real_size, str, len); sprintf_state->obuff.real_size += len; --- 539,545 ---- } INLINE_STATIC void add_nstr P2(char *, str, int, len) { ! if (outbuf_extend(&(sprintf_state->obuff), len) < len) ERROR(ERR_BUFF_OVERFLOW); memcpy(sprintf_state->obuff.buffer + sprintf_state->obuff.real_size, str, len); sprintf_state->obuff.real_size += len; diff -cNr -x .vimrc v22.2b11/std_incl.h v22.2b12/std_incl.h *** v22.2b11/std_incl.h Thu Aug 10 00:28:13 2000 --- v22.2b12/std_incl.h Sun Jul 15 23:37:23 2001 *************** *** 118,128 **** --- 118,133 ---- # include #endif + #if defined(__APPLE__) && defined(__GNUC__) + /* varargs.h distributed with Mac OSX is broken */ + #include + #else #ifdef INCL_STDARG_H # include #else # include #endif + #endif #ifdef INCL_BSTRING_H #include