This is patch23 to PennMUSH 1.7.7. After applying this patch, you will have version 1.7.7p23 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.7.7-patch23 make install If you use GNU patch 2.2, you probably want the above to be 'patch -b -p1', not just 'patch -p1'. Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c, hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically rebuilt on compile. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Alan/Javelin In this patch: Major Changes: * Forking dumps now work with the chunk memory manager. [TAP] Minor Changes: * Chunk allocator improvements in partial read/writes and for Win32. [TAP] * Use the SHA0 algorithm from OpenSSL instead of our own when possible. [SW] Functions: * New digest() function for generating checksums via a variety of algorithms. [SW] * cowner() returns the dbref of a channel's owner. Suggested by Sholevi@M*U*S*H. [SW] * Added baseconv(), for converting numbers from one base to another. Useful for tweaking things like Myrddin's bboard code. Suggested by many people. [SW] Fixes: * Remove warnings in set.c and pcre.c. Report by Nymeria@M*U*S*H * @power messages now show the canonical name of the power. Suggested by Cheetah@M*U*S*H. * Adding DARK players to channels produced a duplicated message. Reported by Mystery8@ST:AW. * Players set WIZARD and ROYALTY would get double notification of some GAME: messages. Fixed now. [SW] * Chatdb corruption possible when admin add players to channels. Reported by several folks, diagnosed by Mordie@M*U*S*H. Prereq: 1.7.7p22 *** 1_7_7.673/Patchlevel Tue, 30 Sep 2003 18:35:19 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.24 600) --- 1_7_7.692(w)/Patchlevel Fri, 10 Oct 2003 07:57:49 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.25 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p22 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p23 *** 1_7_7.673/CHANGES.177 Wed, 01 Oct 2003 10:07:19 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.189 600) --- 1_7_7.692(w)/CHANGES.177 Fri, 10 Oct 2003 07:57:57 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.200 600) *************** *** 18,23 **** --- 18,51 ---- ========================================================================== + Version 1.7.7 patchlevel 23 October 10, 2003 + + Major Changes: + * Forking dumps now work with the chunk memory manager. [TAP] + Minor Changes: + * Chunk allocator improvements in partial read/writes and for + Win32. [TAP] + * Use the SHA0 algorithm from OpenSSL instead of our own when possible. [SW] + Functions: + * New digest() function for generating checksums via a variety of + algorithms. [SW] + * cowner() returns the dbref of a channel's owner. Suggested by + Sholevi@M*U*S*H. [SW] + * Added baseconv(), for converting numbers from one base to another. + Useful for tweaking things like Myrddin's bboard code. Suggested + by many people. [SW] + Fixes: + * Remove warnings in set.c and pcre.c. Report by Nymeria@M*U*S*H + * @power messages now show the canonical name of the power. + Suggested by Cheetah@M*U*S*H. + * Adding DARK players to channels produced a duplicated message. + Reported by Mystery8@ST:AW. + * Players set WIZARD and ROYALTY would get double notification + of some GAME: messages. Fixed now. [SW] + * Chatdb corruption possible when admin add players to channels. + Reported by several folks, diagnosed by Mordie@M*U*S*H. + + Version 1.7.7 patchlevel 22 September 30, 2003 Minor Changes: *************** *** 31,37 **** Fixes: * Attempting to unset attribute flags actually set them. Report by Ambrosia@M*U*S*H. [SW] - * Remove a warning in set.c. Report by Nymeria@M*U*S*H Version 1.7.7 patchlevel 21 September 23, 2003 --- 59,64 ---- *** 1_7_7.673/game/txt/hlp/pennfunc.hlp Tue, 23 Sep 2003 11:13:02 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.13 600) --- 1_7_7.692(w)/game/txt/hlp/pennfunc.hlp Tue, 07 Oct 2003 00:13:25 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.17 600) *************** *** 79,86 **** (In binary) '0110'. These functions are useful for storing small lists of toggle (Yes/No) options efficiently. ! band() bnand() bnot() bor() bxor() ! shl() shr() & Boolean functions Boolean functions all return 0 or 1 as an answer. --- 79,86 ---- (In binary) '0110'. These functions are useful for storing small lists of toggle (Yes/No) options efficiently. ! baseconv() band() bnand() bnot() bor() ! bxor() shl() shr() & Boolean functions Boolean functions all return 0 or 1 as an answer. *************** *** 98,104 **** & Channel functions Channel functions work with the channel system. ! cflags() channels() clock() ctitle() cwho() & Communication functions Communication functions are side-effect functions that send a message to an object or objects. --- 98,105 ---- & Channel functions Channel functions work with the channel system. ! cflags() channels() clock() cowner() ctitle() ! cwho() & Communication functions Communication functions are side-effect functions that send a message to an object or objects. *************** *** 196,209 **** accent() after() alphamin() alphamax() art() before() brackets() capstr() case() caseall() cat() center() comp() chr() decrypt() ! delete() edit() encrypt() escape() if() ! ifelse() lcstr() left() lit() ljust() ! merge() mid() ord() pos() regedit() ! lpos() regmatch() repeat() reverse() right() ! rjust() scramble() secure() sha0() space() ! spellnum() squish() strcat() strinsert() stripaccents() ! stripansi() strlen() strmatch() strreplace() switch() ! trim() ucstr() wrap() See also: STRINGS & Time functions --- 197,210 ---- accent() after() alphamin() alphamax() art() before() brackets() capstr() case() caseall() cat() center() comp() chr() decrypt() ! delete() digest() edit() encrypt() escape() ! if() ifelse() lcstr() left() lit() ! ljust() merge() mid() ord() pos() ! regedit() lpos() regmatch() repeat() reverse() ! right() rjust() scramble() secure() sha0() ! space() spellnum() squish() strcat() strinsert() ! stripaccents()stripansi() strlen() strmatch() strreplace() ! switch() trim() ucstr() wrap() See also: STRINGS & Time functions *************** *** 456,461 **** --- 457,467 ---- Does a bitwise AND of all its arguments, returning the result (A number with only the bits set in every argument set in it). + & BASECONV() + baseconv(, , ) + + Converts a number from one base to another. The bases can be between + 2 (Binary) and 36. & BEEP() beep([]) *************** *** 739,744 **** --- 745,754 ---- You say, "0" See HELP CTU() for more on the angle type. + & COWNER() + cowner() + + Returns the dbref of the owner of a channel. & PCREATE() pcreate(,) *************** *** 868,873 **** --- 878,896 ---- the dbref number of the new room. This is a side-effect function and may not be enabled on some MUSHes. + & DIGEST() + digest(, ) + + Returns a checksum (Hash, digest, etc.) of using the given + . If the mush is compiled with SSL support (See @config + compile), can be one of: + + md2 md4 md5 sha sha1 dss1 mdc2 ripemd160 + + Without SSL, only the sha algorithm is enabled. In both cases, sha returns + the same thing as the sha0() function. + + See also: sha0() & DIST2D() dist2d(x1, y1, x2, y2) *** 1_7_7.673/game/mushcnf.dst Mon, 15 Sep 2003 11:37:00 -0500 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.18 600) --- 1_7_7.692(w)/game/mushcnf.dst Wed, 01 Oct 2003 22:52:59 -0500 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.19 600) *************** *** 131,138 **** ### PennMUSH can swap rarely-referenced attribute text out to a disk ### file, and cache often-used attribute text in memory. This ### can result in substantial (typically 30-50%) savings ! ### in process memory use, at the cost of a very small performance hit ! ### and no longer being able to do forking dumps. ### You can control the size of memory cache (or set it so large ### that nothing is ever swapped to disk), as well as several less ### important parameters here. --- 131,137 ---- ### PennMUSH can swap rarely-referenced attribute text out to a disk ### file, and cache often-used attribute text in memory. This ### can result in substantial (typically 30-50%) savings ! ### in process memory use, at the cost of a very small performance hit. ### You can control the size of memory cache (or set it so large ### that nothing is ever swapped to disk), as well as several less ### important parameters here. *************** *** 147,154 **** # the specified amount. You must give it at least 132000 bytes. # If you want to use an 'infinite' cache, try setting this # to 2000000000; you'll lose the memory benefits, but you'll still ! # gain some locality benefits and overhead savings and you'll ! # be able to do forking dumps. chunk_cache_memory 1000000 # The number of attributes that may be moved at one time, once per --- 146,152 ---- # the specified amount. You must give it at least 132000 bytes. # If you want to use an 'infinite' cache, try setting this # to 2000000000; you'll lose the memory benefits, but you'll still ! # gain some locality benefits and overhead savings. chunk_cache_memory 1000000 # The number of attributes that may be moved at one time, once per *************** *** 387,396 **** # If I do, your memory requirements will double during the dump. # If I don't, the MUSH will pause while it dumps. # If you're low on memory, don't do this. - # If you want to use the chunk-based memory allocator, you may not - # be able to do forking dumps, and it will ignore this. # If you're on Win32, don't do this; fork() is not defined. ! forking_dump no # If you're not forking, you get a bunch of messages that you # can set to warn players when the dump is 5 minutes away, --- 385,392 ---- # If I do, your memory requirements will double during the dump. # If I don't, the MUSH will pause while it dumps. # If you're low on memory, don't do this. # If you're on Win32, don't do this; fork() is not defined. ! forking_dump yes # If you're not forking, you get a bunch of messages that you # can set to warn players when the dump is 5 minutes away, *** 1_7_7.673/src/shs.c Mon, 28 Apr 2003 22:37:00 -0500 dunemush (pennmush/b/18_shs.c 1.10 660) --- 1_7_7.692(w)/src/shs.c Fri, 10 Oct 2003 08:02:58 -0500 dunemush (pennmush/b/18_shs.c 1.12 660) *************** *** 18,23 **** --- 18,26 ---- #include "copyrite.h" #include "config.h" + + #ifndef HAS_OPENSSL + #include #include "shs.h" #include "confmagic.h" *************** *** 417,419 **** --- 420,424 ---- if (shsInfo->reverse_wanted) byteReverse(shsInfo->data, SHS_DIGESTSIZE); } + + #endif /* HAS_OPENSSL */ *** 1_7_7.673/src/wiz.c Sat, 20 Sep 2003 12:59:32 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.2 660) --- 1_7_7.692(w)/src/wiz.c Fri, 10 Oct 2003 08:02:58 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.4 660) *************** *** 1077,1084 **** if (revoke_it) { Powers(thing) &= ~pwr; if (!AreQuiet(player, thing)) ! notify_format(player, T("%s - %s power removed."), Name(thing), power); ! do_log(LT_WIZ, player, thing, T("Power Removed: %s"), power); } else { if (Hasprivs(thing) && (pwr == IS_GUEST)) { notify(player, T("You can't make admin into guests.")); --- 1077,1085 ---- if (revoke_it) { Powers(thing) &= ~pwr; if (!AreQuiet(player, thing)) ! notify_format(player, T("%s - %s power removed."), Name(thing), ! power_to_string(pwr)); ! do_log(LT_WIZ, player, thing, T("Power Removed: %s"), power_to_string(pwr)); } else { if (Hasprivs(thing) && (pwr == IS_GUEST)) { notify(player, T("You can't make admin into guests.")); *************** *** 1086,1093 **** } Powers(thing) |= pwr; if (!AreQuiet(player, thing)) ! notify_format(player, T("%s - %s power granted."), Name(thing), power); ! do_log(LT_WIZ, player, thing, T("Power Granted: %s"), power); } } --- 1087,1095 ---- } Powers(thing) |= pwr; if (!AreQuiet(player, thing)) ! notify_format(player, T("%s - %s power granted."), Name(thing), ! power_to_string(pwr)); ! do_log(LT_WIZ, player, thing, T("Power Granted: %s"), power_to_string(pwr)); } } *** 1_7_7.673/src/strutil.c Mon, 23 Jun 2003 11:10:04 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1.1.1.1.21.1.2.1.2.1.6 660) --- 1_7_7.692(w)/src/strutil.c Fri, 10 Oct 2003 08:02:58 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1.1.1.1.21.1.2.1.2.1.7 660) *************** *** 28,34 **** #include "confmagic.h" char *next_token(char *str, char sep); ! static int format_long(long val, char *buff, char **bp, int maxlen); static char * mush_strndup(const char *src, size_t len, const char *check) __attribute_malloc__; --- 28,34 ---- #include "confmagic.h" char *next_token(char *str, char sep); ! int format_long(long val, char *buff, char **bp, int maxlen, int base); static char * mush_strndup(const char *src, size_t len, const char *check) __attribute_malloc__; *************** *** 619,625 **** int safe_integer(int i, char *buff, char **bp) { ! return format_long(i, buff, bp, BUFFER_LEN); } /** Safely store an unsigned integer into a buffer. --- 619,625 ---- int safe_integer(int i, char *buff, char **bp) { ! return format_long(i, buff, bp, BUFFER_LEN, 10); } /** Safely store an unsigned integer into a buffer. *************** *** 643,649 **** int safe_integer_sbuf(int i, char *buff, char **bp) { ! return format_long(i, buff, bp, SBUF_LEN); } /** Safely store a dbref into a buffer. --- 643,649 ---- int safe_integer_sbuf(int i, char *buff, char **bp) { ! return format_long(i, buff, bp, SBUF_LEN, 10); } /** Safely store a dbref into a buffer. *************** *** 662,668 **** *bp = saved; return 1; } ! if (format_long(d, buff, bp, BUFFER_LEN)) { *bp = saved; return 1; } --- 662,668 ---- *bp = saved; return 1; } ! if (format_long(d, buff, bp, BUFFER_LEN, 10)) { *bp = saved; return 1; } *************** *** 1225,1233 **** * \param buff string to append to. * \param bp pointer to pointer to insertion point in buff. * \param maxlen total length of string. */ ! static int ! format_long(long val, char *buff, char **bp, int maxlen) { char stack[128]; /* Even a negative 64 bit number will only be 21 digits or so max. This should be plenty of --- 1225,1234 ---- * \param buff string to append to. * \param bp pointer to pointer to insertion point in buff. * \param maxlen total length of string. + * \param base the base to render the number in. */ ! int ! format_long(long val, char *buff, char **bp, int maxlen, int base) { char stack[128]; /* Even a negative 64 bit number will only be 21 digits or so max. This should be plenty of *************** *** 1235,1240 **** --- 1236,1242 ---- char *current; int size = 0, neg = 0; ldiv_t r; + const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz"; /* Sanity checks */ if (!bp || !buff || !*bp) *************** *** 1242,1255 **** if (*bp - buff >= maxlen - 1) return 1; if (val < 0) { neg = 1; val = -val; if (val < 0) { /* -LONG_MIN == LONG_MIN on 2's complement systems. Take the easy way out since this value is rarely encountered. */ ! sprintf(stack, "%ld", val); ! return safe_str(stack, buff, bp); } } --- 1244,1271 ---- if (*bp - buff >= maxlen - 1) return 1; + if (base < 2) + base = 2; + else if (base > 36) + base = 36; + if (val < 0) { neg = 1; val = -val; if (val < 0) { /* -LONG_MIN == LONG_MIN on 2's complement systems. Take the easy way out since this value is rarely encountered. */ ! switch (base) { ! case 10: ! return safe_format(buff, bp, "%ld", val); ! case 16: ! return safe_format(buff, bp, "%lx", val); ! case 8: ! return safe_format(buff, bp, "%lo", val); ! default: ! /* Weird base /and/ LONG_MIN. Fix someday. */ ! return 0; ! } } } *************** *** 1263,1270 **** /* ldiv(x, y) does x/y and x%y at the same time (both of * which we need). */ ! r = ldiv(r.quot, 10); ! *(--current) = (unsigned char) r.rem + '0'; } while (r.quot); /* Add the negative sign if needed. */ --- 1279,1286 ---- /* ldiv(x, y) does x/y and x%y at the same time (both of * which we need). */ ! r = ldiv(r.quot, base); ! *(--current) = digits[r.rem]; } while (r.quot); /* Add the negative sign if needed. */ *** 1_7_7.673/src/player.c Wed, 03 Sep 2003 22:39:22 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.5 660) --- 1_7_7.692(w)/src/player.c Fri, 10 Oct 2003 08:02:58 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.6 660) *************** *** 67,72 **** --- 67,73 ---- { ATTR *a; char *saved; + char *passwd; /* read the password and compare it */ if (!(a = atr_get_noparent(player, pword_attr))) *************** *** 77,83 **** if (!saved) return 0; ! if (strcmp(mush_crypt(password), saved) != 0) { #if (CRYPT_SYSTEM == 3) || (CRYPT_SYSTEM == 1) /* shs encryption didn't match. Try crypt(3) */ if (strcmp(crypt(password, "XX"), saved) != 0) { --- 78,86 ---- if (!saved) return 0; ! passwd = mush_crypt(password); ! ! if (strcmp(passwd, saved) != 0) { #if (CRYPT_SYSTEM == 3) || (CRYPT_SYSTEM == 1) /* shs encryption didn't match. Try crypt(3) */ if (strcmp(crypt(password, "XX"), saved) != 0) { *************** *** 86,92 **** return 0; } /* crypt(3) worked. Change password to SHS-encrypted */ ! (void) atr_add(player, pword_attr, mush_crypt(password), GOD, NOTHING); #else #if (CRYPT_SYSTEM == 4) /* prevent direct entry of the raw encrypted password */ --- 89,95 ---- return 0; } /* crypt(3) worked. Change password to SHS-encrypted */ ! (void) atr_add(player, pword_attr, passwd, GOD, NOTHING); #else #if (CRYPT_SYSTEM == 4) /* prevent direct entry of the raw encrypted password */ *************** *** 99,105 **** free(saved); return 0; /* Plaintext didn't match */ } ! (void) atr_add(player, pword_attr, mush_crypt(password), GOD, NOTHING); #else free(saved); return 0; --- 102,108 ---- free(saved); return 0; /* Plaintext didn't match */ } ! (void) atr_add(player, pword_attr, passwd, GOD, NOTHING); #else free(saved); return 0; *** 1_7_7.673/src/mycrypt.c Wed, 12 Mar 2003 12:31:02 -0600 dunemush (pennmush/b/50_mycrypt.c 1.10 660) --- 1_7_7.692(w)/src/mycrypt.c Fri, 10 Oct 2003 08:02:57 -0500 dunemush (pennmush/b/50_mycrypt.c 1.11 660) *************** *** 13,20 **** --- 13,24 ---- #include #include "conf.h" #if (CRYPT_SYSTEM > 0) + #ifdef HAS_OPENSSL + #include + #else #include "shs.h" #endif + #endif #include "confmagic.h" char *mush_crypt(const char *key); *************** *** 29,42 **** #if (CRYPT_SYSTEM == 0) return (char *) key; #else - SHS_INFO shsInfo; static char crypt_buff[70]; shsInfo.reverse_wanted = (BYTE) options.reverse_shs; shsInit(&shsInfo); shsUpdate(&shsInfo, (const BYTE *) key, strlen(key)); shsFinal(&shsInfo); sprintf(crypt_buff, "XX%lu%lu", shsInfo.digest[0], shsInfo.digest[1]); return crypt_buff; #endif } --- 33,69 ---- #if (CRYPT_SYSTEM == 0) return (char *) key; #else static char crypt_buff[70]; + #ifdef HAS_OPENSSL + char hash[SHA_DIGEST_LENGTH]; + unsigned int a, b; + + SHA(key, strlen(key), hash); + + memcpy(&a, hash, sizeof a); + memcpy(&b, hash + sizeof a, sizeof b); + + if (options.reverse_shs) { + int ra, rb; + ra = (a << 16) | (a >> 16); + rb = (b << 16) | (b >> 16); + a = ((ra & 0xFF00FF00L) >> 8) | ((ra & 0x00FF00FFL) << 8); + b = ((rb & 0xFF00FF00L) >> 8) | ((rb & 0x00FF00FFL) << 8); + } + + sprintf(crypt_buff, "XX%u%u", a, b); + + #else + SHS_INFO shsInfo; + shsInfo.reverse_wanted = (BYTE) options.reverse_shs; shsInit(&shsInfo); shsUpdate(&shsInfo, (const BYTE *) key, strlen(key)); shsFinal(&shsInfo); sprintf(crypt_buff, "XX%lu%lu", shsInfo.digest[0], shsInfo.digest[1]); + #endif + return crypt_buff; #endif } *** 1_7_7.673/src/game.c Wed, 03 Sep 2003 22:31:51 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.1.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3 660) --- 1_7_7.692(w)/src/game.c Fri, 10 Oct 2003 08:02:57 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.1.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.3 660) *************** *** 536,542 **** void fork_and_dump(int forking) { ! int child, nofork, status; epoch++; #ifdef LOG_CHUNK_STATS --- 536,542 ---- void fork_and_dump(int forking) { ! int child, nofork, status, split; epoch++; #ifdef LOG_CHUNK_STATS *************** *** 548,567 **** nofork = 1; else nofork = !forking || (paranoid_dump == 2); /* Don't fork for dump/debug */ - if (!nofork && chunk_num_swapped()) { - /* Ack, can't fork, 'cause we have stuff on disk... */ - do_log(LT_ERR, 0, 0, - "fork_and_dump: Data are swapped to disk, so nonforking dumps will be used."); - flag_broadcast("WIZARD", 0, - "DUMP: Data are swapped to disk, so nonforking dumps will be used."); - nofork = 1; - } #ifdef WIN32 nofork = 1; #endif #ifdef macintosh nofork = 1; #endif if (!nofork) { #ifndef macintosh #ifndef WIN32 --- 548,575 ---- nofork = 1; else nofork = !forking || (paranoid_dump == 2); /* Don't fork for dump/debug */ #ifdef WIN32 nofork = 1; #endif #ifdef macintosh nofork = 1; #endif + split = 0; + if (!nofork && chunk_num_swapped()) { + #ifndef WIN32 + /* Try to clone the chunk swapfile. */ + if (chunk_fork_file()) { + split = 1; + } else { + /* Ack, can't fork, 'cause we have stuff on disk... */ + do_log(LT_ERR, 0, 0, + "fork_and_dump: Data are swapped to disk, so nonforking dumps will be used."); + flag_broadcast("WIZARD", 0, + "DUMP: Data are swapped to disk, so nonforking dumps will be used."); + nofork = 1; + } + #endif + } if (!nofork) { #ifndef macintosh #ifndef WIN32 *************** *** 574,592 **** flag_broadcast(0, 0, "%s", DUMP_NOFORK_MESSAGE); child = 0; nofork = 1; ! } else if (child > 0) forked_dump_pid = child; ! #ifdef HAS_SETPRIORITY - else { /* Lower the priority of the child to make parent more responsive */ #ifdef HAS_GETPRIORITY setpriority(PRIO_PROCESS, child, getpriority(PRIO_PROCESS, child) + 4); #else /* HAS_GETPRIORITY */ setpriority(PRIO_PROCESS, child, 8); #endif /* HAS_GETPRIORITY */ - } #endif /* HAS_SETPRIORITY */ #endif /* WIN32 */ #endif /* macintosh */ } else { --- 582,605 ---- flag_broadcast(0, 0, "%s", DUMP_NOFORK_MESSAGE); child = 0; nofork = 1; ! if (split) { ! split = 0; ! chunk_fork_done(); ! } ! } else if (child > 0) { forked_dump_pid = child; ! chunk_fork_parent(); ! } else { ! chunk_fork_child(); #ifdef HAS_SETPRIORITY /* Lower the priority of the child to make parent more responsive */ #ifdef HAS_GETPRIORITY setpriority(PRIO_PROCESS, child, getpriority(PRIO_PROCESS, child) + 4); #else /* HAS_GETPRIORITY */ setpriority(PRIO_PROCESS, child, 8); #endif /* HAS_GETPRIORITY */ #endif /* HAS_SETPRIORITY */ + } #endif /* WIN32 */ #endif /* macintosh */ } else { *************** *** 598,603 **** --- 611,620 ---- /* in the child */ release_fd(); status = dump_database_internal(); + #ifndef WIN32 + if (split) + chunk_fork_done(); + #endif if (!nofork) { _exit(status); /* !!! */ } else { *** 1_7_7.673/src/funmath.c Mon, 28 Apr 2003 22:03:14 -0500 dunemush (pennmush/c/15_funmath.c 1.39.1.1.1.1.1.1.1.10.1.5 660) --- 1_7_7.692(w)/src/funmath.c Fri, 10 Oct 2003 08:02:57 -0500 dunemush (pennmush/c/15_funmath.c 1.39.1.1.1.1.1.1.1.10.1.8 660) *************** *** 53,58 **** --- 53,60 ---- static double frac(double v, int *RESTRICT n, int *RESTRICT d, double error); void init_math_hashtab(void); + extern int format_long(long n, char *buff, char **bp, int maxlen, int base); + MATH_PROTO(math_add); MATH_PROTO(math_sub); MATH_PROTO(math_mul); *************** *** 1578,1583 **** --- 1580,1619 ---- mush_free((Malloc_t) ptr, "string"); } + FUNCTION(fun_baseconv) + { + long n; + int from, to; + char *end; + + if (!(is_integer(args[1]) && is_integer(args[2]))) { + safe_str(T(e_ints), buff, bp); + return; + } + + from = parse_integer(args[1]); + to = parse_integer(args[2]); + + if (from < 2 || from > 36) { + safe_str(T("#-1 FROM BASE OUT OF RANGE"), buff, bp); + return; + } + + if (to < 2 || to > 36) { + safe_str(T("#-1 TO BASE OUT OF RANGE"), buff, bp); + return; + } + + n = strtol(trim_space_sep(args[0], ' '), &end, from); + + if (*end != '\0') { + safe_str(T("#-1 MALFORMED NUMBER"), buff, bp); + return; + } + + format_long(n, buff, bp, BUFFER_LEN, to); + } + MATH_FUNC(math_add) { NVAL result = 0; *** 1_7_7.673/src/function.c Thu, 11 Sep 2003 15:21:34 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.1 660) --- 1_7_7.692(w)/src/function.c Fri, 10 Oct 2003 08:02:56 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.4 660) *************** *** 191,196 **** --- 191,197 ---- {"ART", fun_art, 1, 1, FN_REG}, {"ATRLOCK", fun_atrlock, 1, 2, FN_REG}, {"BAND", fun_band, 1, INT_MAX, FN_REG}, + {"BASECONV", fun_baseconv, 3, 3, FN_REG}, {"BEEP", fun_beep, 0, 1, FN_REG}, {"BEFORE", fun_before, 2, 2, FN_REG}, {"BNAND", fun_bnand, 2, 2, FN_REG}, *************** *** 206,223 **** {"CAT", fun_cat, 1, INT_MAX, FN_REG}, #ifdef CHAT_SYSTEM {"CEMIT", fun_cemit, 2, 3, FN_REG}, #endif {"CENTER", fun_center, 2, 3, FN_REG}, {"CHILDREN", fun_lsearch, 1, 1, FN_REG}, {"CHR", fun_chr, 1, 1, FN_REG}, - #ifdef CHAT_SYSTEM - {"CFLAGS", fun_cflags, 1, 2, FN_REG}, - {"CHANNELS", fun_channels, 0, 2, FN_REG}, - #endif {"CHECKPASS", fun_checkpass, 2, 2, FN_REG | FN_WIZARD}, - #ifdef CHAT_SYSTEM - {"CLOCK", fun_clock, 1, 2, FN_REG}, - #endif {"CLONE", fun_clone, 1, 1, FN_REG}, {"COMP", fun_comp, 2, 3, FN_REG}, {"CON", fun_con, 1, 1, FN_REG}, --- 207,223 ---- {"CAT", fun_cat, 1, INT_MAX, FN_REG}, #ifdef CHAT_SYSTEM {"CEMIT", fun_cemit, 2, 3, FN_REG}, + {"CFLAGS", fun_cflags, 1, 2, FN_REG}, + {"CHANNELS", fun_channels, 0, 2, FN_REG}, + {"CLOCK", fun_clock, 1, 2, FN_REG}, + {"COWNER", fun_cowner, 1, 1, FN_REG}, + {"CTITLE", fun_ctitle, 2, 2, FN_REG}, + {"CWHO", fun_cwho, 1, 1, FN_REG}, #endif {"CENTER", fun_center, 2, 3, FN_REG}, {"CHILDREN", fun_lsearch, 1, 1, FN_REG}, {"CHR", fun_chr, 1, 1, FN_REG}, {"CHECKPASS", fun_checkpass, 2, 2, FN_REG | FN_WIZARD}, {"CLONE", fun_clone, 1, 1, FN_REG}, {"COMP", fun_comp, 2, 3, FN_REG}, {"CON", fun_con, 1, 1, FN_REG}, *************** *** 230,245 **** {"COR", fun_cor, 2, INT_MAX, FN_NOPARSE}, {"CREATE", fun_create, 1, 2, FN_REG}, {"CTIME", fun_ctime, 1, 1, FN_REG}, - #ifdef CHAT_SYSTEM - {"CTITLE", fun_ctitle, 2, 2, FN_REG}, - {"CWHO", fun_cwho, 1, 1, FN_REG}, - #endif {"DEC", fun_dec, 1, 1, FN_REG}, {"DECRYPT", fun_decrypt, 2, 2, FN_REG}, {"DEFAULT", fun_default, 2, 2, FN_NOPARSE}, {"DELETE", fun_delete, 3, 3, FN_REG}, {"DIE", fun_die, 2, 3, FN_REG}, {"DIG", fun_dig, 1, 3, FN_REG}, {"DIST2D", fun_dist2d, 4, 4, FN_REG}, {"DIST3D", fun_dist3d, 6, 6, FN_REG}, {"DIV", fun_div, 2, 2, FN_REG}, --- 230,242 ---- {"COR", fun_cor, 2, INT_MAX, FN_NOPARSE}, {"CREATE", fun_create, 1, 2, FN_REG}, {"CTIME", fun_ctime, 1, 1, FN_REG}, {"DEC", fun_dec, 1, 1, FN_REG}, {"DECRYPT", fun_decrypt, 2, 2, FN_REG}, {"DEFAULT", fun_default, 2, 2, FN_NOPARSE}, {"DELETE", fun_delete, 3, 3, FN_REG}, {"DIE", fun_die, 2, 3, FN_REG}, {"DIG", fun_dig, 1, 3, FN_REG}, + {"DIGEST", fun_digest, 2, -2, FN_REG}, {"DIST2D", fun_dist2d, 4, 4, FN_REG}, {"DIST3D", fun_dist3d, 6, 6, FN_REG}, {"DIV", fun_div, 2, 2, FN_REG}, *** 1_7_7.673/src/funcrypt.c Mon, 11 Aug 2003 16:30:36 -0500 dunemush (pennmush/c/19_funcrypt.c 1.11 660) --- 1_7_7.692(w)/src/funcrypt.c Fri, 10 Oct 2003 08:02:56 -0500 dunemush (pennmush/c/19_funcrypt.c 1.15 660) *************** *** 26,38 **** --- 26,47 ---- #include "attrib.h" #include "ansi.h" #include "match.h" + #ifdef HAS_OPENSSL + #include + #include + #else #include "shs.h" + #endif #include "confmagic.h" static char *crunch_code _((char *code)); static char *crypt_code _((char *code, char *text, int type)); + #ifdef HAS_OPENSSL + static void safe_hexchar(unsigned char c, char *buff, char **bp); + #endif + /* Copy over only alphanumeric chars */ static char * crunch_code(char *code) *************** *** 119,124 **** --- 128,142 ---- FUNCTION(fun_sha0) { + #ifdef HAS_OPENSSL + unsigned char hash[SHA_DIGEST_LENGTH]; + int n; + + SHA(args[0], arglens[0], hash); + + for (n = 0; n < SHA_DIGEST_LENGTH; n++) + safe_hexchar(hash[n], buff, bp); + #else SHS_INFO shsInfo; shsInfo.reverse_wanted = (BYTE) options.reverse_shs; shsInit(&shsInfo); *************** *** 127,130 **** --- 145,202 ---- safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3], shsInfo.digest[4]); + #endif + } + + FUNCTION(fun_digest) + { + #ifdef HAS_OPENSSL + EVP_MD_CTX ctx; + const EVP_MD *mp; + unsigned char md[EVP_MAX_MD_SIZE]; + size_t n, len = 0; + + if ((mp = EVP_get_digestbyname(args[0])) == NULL) { + safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); + return; + } + + EVP_DigestInit(&ctx, mp); + EVP_DigestUpdate(&ctx, args[1], arglens[1]); + EVP_DigestFinal(&ctx, md, &len); + + for (n = 0; n < len; n++) { + safe_hexchar(md[n], buff, bp); + } + + #else + if (strcmp(args[0], "sha") == 0) { + SHS_INFO shsInfo; + shsInfo.reverse_wanted = (BYTE) options.reverse_shs; + shsInit(&shsInfo); + shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]); + shsFinal(&shsInfo); + safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0], + shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3], + shsInfo.digest[4]); + } else { + safe_str(T("#-1 UNSUPPORTED DIGEST TYPE"), buff, bp); + } + #endif + } + + #ifdef HAS_OPENSSL + static void + safe_hexchar(unsigned char c, char *buff, char **bp) + { + const char *digits = "0123456789abcdef"; + if (*bp - buff < BUFFER_LEN - 1) { + **bp = digits[c >> 4]; + (*bp)++; + } + if (*bp - buff < BUFFER_LEN - 1) { + **bp = digits[c & 0x0F]; + (*bp)++; + } } + #endif *** 1_7_7.673/src/flags.c Sat, 20 Sep 2003 12:59:32 -0500 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.2 660) --- 1_7_7.692(w)/src/flags.c Fri, 10 Oct 2003 08:02:56 -0500 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.3 660) *************** *** 2285,2287 **** --- 2285,2302 ---- notify_format(player, "@power %s = %s", name, p->name); } } + + /* Not commented because this should go away in power rewrite */ + const char * + power_to_string(int pwr) + { + POWER *p; + for (p = power_table; p->name; p++) { + /* Special case for immortal, which we don't show any more */ + if (!strcasecmp(p->name, "immortal")) + continue; + if (pwr & p->flag) + return p->name; + } + return ""; + } *** 1_7_7.673/src/extchat.c Mon, 29 Sep 2003 16:37:45 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.3 660) --- 1_7_7.692(w)/src/extchat.c Fri, 10 Oct 2003 08:02:56 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.7 660) *************** *** 250,256 **** CHANUSER *u; u = (CHANUSER *) mush_malloc(sizeof(CHANUSER), "CHANUSER"); if (!u) ! return NULL; CUdbref(u) = who; CUtype(u) = CU_DEFAULT_FLAGS; u->title[0] = '\0'; --- 250,256 ---- CHANUSER *u; u = (CHANUSER *) mush_malloc(sizeof(CHANUSER), "CHANUSER"); if (!u) ! panic("Couldn't allocate memory in new_user in extchat.c"); CUdbref(u) = who; CUtype(u) = CU_DEFAULT_FLAGS; u->title[0] = '\0'; *************** *** 293,299 **** static int load_channel(FILE * fp, CHAN *ch) { - int ret = 1; strcpy(ChanName(ch), getstring_noalloc(fp)); if (feof(fp)) return 0; --- 293,298 ---- *************** *** 310,321 **** ChanNumUsers(ch) = getref(fp); ChanMaxUsers(ch) = ChanNumUsers(ch); ChanUsers(ch) = NULL; ! if (ChanNumUsers(ch) > 0) { ! ret = load_chanusers(fp, ch); ! if (ret < 0) ! return 0; ! ChanNumUsers(ch) = ret; ! } return 1; } --- 309,316 ---- ChanNumUsers(ch) = getref(fp); ChanMaxUsers(ch) = ChanNumUsers(ch); ChanUsers(ch) = NULL; ! if (ChanNumUsers(ch) > 0) ! ChanNumUsers(ch) = load_chanusers(fp, ch); return 1; } *************** *** 331,338 **** /* Don't bother if the player isn't a valid dbref or the wrong type */ if (GoodObject(player) && Chan_Ok_Type(ch, player)) { user = new_user(player); - if (!user) - return -1; CUtype(user) = getref(fp); strcpy(CUtitle(user), getstring_noalloc(fp)); CUnext(user) = NULL; --- 326,331 ---- *************** *** 989,1002 **** if (!Channel_Quiet(chan) && !DarkLegal(victim)) { format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE, T("<%s> %s has joined this channel."), NULL); - ChanNumUsers(chan)++; - } else { - notify_format(player, - T("%s is already on channel <%s>."), Name(victim), - ChanName(chan)); } ! return; } } else if (!strcasecmp("off", com) || !strcasecmp("leave", com)) { char title[CU_TITLE_LEN]; /* You must control either the victim or the channel */ --- 982,995 ---- if (!Channel_Quiet(chan) && !DarkLegal(victim)) { format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE, T("<%s> %s has joined this channel."), NULL); } ! ChanNumUsers(chan)++; ! } else { ! notify_format(player, ! T("%s is already on channel <%s>."), Name(victim), ! ChanName(chan)); } + return; } else if (!strcasecmp("off", com) || !strcasecmp("leave", com)) { char title[CU_TITLE_LEN]; /* You must control either the victim or the channel */ *************** *** 1979,1984 **** --- 1972,1999 ---- } } + FUNCTION(fun_cowner) + { + /* Return the dbref of the owner of a channel. */ + CHAN *c; + + if (!args[0] || !*args[0]) { + safe_str(T("#-1 NO CHANNEL GIVEN"), buff, bp); + return; + } + switch (find_channel(args[0], &c, executor)) { + case CMATCH_NONE: + safe_str(T("#-1 NO SUCH CHANNEL"), buff, bp); + break; + case CMATCH_AMBIG: + safe_str(T("#-1 AMBIGUOUS CHANNEL NAME"), buff, bp); + break; + default: + safe_dbref(ChanCreator(c), buff, bp); + } + + } + /* Remove all players from a channel, notifying them. This is the * utility routine for handling it. The command @channel/wipe * calls do_chan_wipe, below *** 1_7_7.673/src/conf.c Sun, 31 Aug 2003 16:23:55 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.7 660) --- 1_7_7.692(w)/src/conf.c Fri, 10 Oct 2003 08:02:56 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.8 660) *************** *** 1547,1552 **** --- 1547,1556 ---- notify(player, T(" Attributes are 8-bit word compressed in memory.")); #endif + #ifdef HAS_OPENSSL + notify(player, T(" The MUSH was compiled with SSL support.")); + #endif + #ifdef SINGLE_LOGFILE notify(player, T(" Logging is to a single log file.")); #else *** 1_7_7.673/src/bsd.c Tue, 30 Sep 2003 18:01:23 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.3 660) --- 1_7_7.692(w)/src/bsd.c Fri, 10 Oct 2003 08:02:55 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.4 660) *************** *** 3344,3352 **** if (WIFSIGNALED(my_stat)) { do_rawlog(LT_ERR, T("ERROR! forking dump exited with signal %d"), WTERMSIG(my_stat)); ! flag_broadcast("WIZARD", 0, ! T("GAME: ERROR! Forking database save failed!")); ! flag_broadcast("ROYALTY", 0, T("GAME: ERROR! Forking database save failed!")); } else if (WIFEXITED(my_stat) && WEXITSTATUS(my_stat) == 0) { time(&last_dump_time); --- 3344,3350 ---- if (WIFSIGNALED(my_stat)) { do_rawlog(LT_ERR, T("ERROR! forking dump exited with signal %d"), WTERMSIG(my_stat)); ! flag_broadcast("ROYALTY WIZARD", 0, T("GAME: ERROR! Forking database save failed!")); } else if (WIFEXITED(my_stat) && WEXITSTATUS(my_stat) == 0) { time(&last_dump_time); *************** *** 3684,3691 **** flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); if (Dark(player)) { ! flag_broadcast("WIZARD", "MONITOR", "%s %s", T("GAME:"), tbuf1); ! flag_broadcast("ROYALTY", "MONITOR", "%s %s", T("GAME:"), tbuf1); } else flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); --- 3682,3688 ---- flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); if (Dark(player)) { ! flag_broadcast("ROYALTY WIZARD", "MONITOR", "%s %s", T("GAME:"), tbuf1); } else flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); *************** *** 3845,3852 **** if (Suspect(player)) flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); if (Dark(player)) { ! flag_broadcast("WIZARD", "MONITOR", "%s %s", T("GAME:"), tbuf1); ! flag_broadcast("ROYALTY", "MONITOR", "%s %s", T("GAME:"), tbuf1); } else flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); local_disconnect(player, num); --- 3842,3848 ---- if (Suspect(player)) flag_broadcast("WIZARD", 0, T("GAME: Suspect %s"), tbuf1); if (Dark(player)) { ! flag_broadcast("ROYALTY WIZARD", "MONITOR", "%s %s", T("GAME:"), tbuf1); } else flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); local_disconnect(player, num); *** 1_7_7.673/hdrs/version.h Tue, 30 Sep 2003 18:35:19 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.26 660) --- 1_7_7.692(w)/hdrs/version.h Fri, 10 Oct 2003 08:03:01 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.27 660) *************** *** 1,3 **** ! #define VERSION "PennMUSH version 1.7.7 patchlevel 22 [09/30/2003]" ! #define SHORTVN "PennMUSH 1.7.7p22" ! #define NUMVERSION 001007007022 --- 1,3 ---- ! #define VERSION "PennMUSH version 1.7.7 patchlevel 23 [10/10/2003]" ! #define SHORTVN "PennMUSH 1.7.7p23" ! #define NUMVERSION 001007007023 *** 1_7_7.673/hdrs/flags.h Thu, 18 Sep 2003 09:04:44 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.26 660) --- 1_7_7.692(w)/hdrs/flags.h Fri, 10 Oct 2003 08:02:59 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.27 660) *************** *** 123,128 **** --- 123,129 ---- char *args_right[]); extern void do_flag_add(dbref player, const char *name, char *args_right[]); extern void do_flag_letter(dbref player, const char *name, const char *letter); + extern const char *power_to_string(int pwr); #define twiddle_flag_bitmask(bm,b,neg) (neg ? clear_flag_bitmask(bm,b) : \ set_flag_bitmask(bm,b)) *** 1_7_7.673/MANIFEST Mon, 15 Sep 2003 11:37:00 -0500 dunemush (pennmush/d/34_MANIFEST 1.21.1.2.1.7.1.3.1.13 600) --- 1_7_7.692(w)/MANIFEST Tue, 07 Oct 2003 00:11:26 -0500 dunemush (pennmush/d/34_MANIFEST 1.21.1.2.1.7.1.3.1.14 600) *************** *** 237,241 **** --- 237,242 ---- test/PennMUSH.pm test/TestHarness.pm test/testatree.pl + test/testdigest.pl test/testhastype.pl test/testrand.pl *** 1_7_7.673/src/pcre.c Thu, 17 Apr 2003 09:49:14 -0500 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1.1.1.1.4 660) --- 1_7_7.692(w)/src/pcre.c Fri, 10 Oct 2003 08:02:58 -0500 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1.1.1.1.5 660) *************** *** 35,40 **** --- 35,42 ---- /* Modified by Shawn Wagner for PennMUSH to fit in one file and remove things we don't use, like a bunch of API functions and utf-8 support. If you want the full thing, see http://www.pcre.org. */ + /* Modified by Alan Schwartz for PennMUSH to change the use of + * 'isblank' as a variable (reported to Philip Hazel for pcre 4.5) */ #include "config.h" #include *************** *** 2470,2488 **** posix_class *= 3; for (i = 0; i < 3; i++) { ! BOOL isblank = strncmp((char *) ptr, "blank", 5) == 0; int taboffset = posix_class_maps[posix_class + i]; if (taboffset < 0) break; if (local_negate) { for (c = 0; c < 32; c++) class[c] |= ~cbits[c + taboffset]; ! if (isblank) class[1] |= 0x3c; } else { for (c = 0; c < 32; c++) class[c] |= cbits[c + taboffset]; ! if (isblank) class[1] &= ~0x3c; } } --- 2472,2490 ---- posix_class *= 3; for (i = 0; i < 3; i++) { ! BOOL is_a_blank = strncmp((char *) ptr, "blank", 5) == 0; int taboffset = posix_class_maps[posix_class + i]; if (taboffset < 0) break; if (local_negate) { for (c = 0; c < 32; c++) class[c] |= ~cbits[c + taboffset]; ! if (is_a_blank) class[1] |= 0x3c; } else { for (c = 0; c < 32; c++) class[c] |= cbits[c + taboffset]; ! if (is_a_blank) class[1] &= ~0x3c; } } *** 1_7_7.673/src/mysocket.c Tue, 30 Sep 2003 18:01:23 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.11 660) --- 1_7_7.692(w)/src/mysocket.c Fri, 10 Oct 2003 08:02:57 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.12 660) *************** *** 364,369 **** --- 364,370 ---- /* Enable TCP keepalive on the given socket if we can */ + /* ARGSUSED */ void set_keepalive(int s) { *** 1_7_7.673/win32/pennmush.dsp Sun, 17 Aug 2003 15:49:10 -0500 dunemush (pennmush/f/9_pennmush.d 1.13 660) --- 1_7_7.692(w)/win32/pennmush.dsp Wed, 01 Oct 2003 22:12:21 -0500 dunemush (pennmush/f/9_pennmush.d 1.14 660) *************** *** 1,374 **** ! ! # Microsoft Developer Studio Project File - Name="pennmush" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Console Application" 0x0103 ! ! CFG=pennmush - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "pennmush.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "pennmush.mak" CFG="pennmush - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "pennmush - Win32 Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "pennmush - Win32 Debug" (based on "Win32 (x86) Console Application") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "pennmush - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /Ob0 /I "./hdrs" /I "./" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /I /Win32" " /c ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 user32.lib winmm.lib wsock32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /machine:I386 ! ! !ELSEIF "$(CFG)" == "pennmush - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /ZI /I "./win32" /I "./hdrs" /I "./" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # SUBTRACT CPP /Ox /Ot /Os ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib user32.lib winmm.lib wsock32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! ! !ENDIF ! ! # Begin Target ! ! # Name "pennmush - Win32 Release" ! # Name "pennmush - Win32 Debug" ! # Begin Source File ! ! SOURCE=.\src\access.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\atr_tab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\attrib.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\boolexp.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\bsd.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\chunk.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cmdlocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cmds.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\command.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\compress.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\conf.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cque.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\create.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\db.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\destroy.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\extchat.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\extmail.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\filecopy.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\flaglocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\flags.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funcrypt.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\function.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\fundb.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funlist.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funlocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funmath.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funmisc.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funstr.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funtime.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funufun.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\game.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\help.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\htab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\ident.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\local.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\lock.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\log.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\look.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\malias.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\match.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\memcheck.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\move.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mycrypt.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mymalloc.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mysocket.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\myssl.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\notify.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\parse.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\pcre.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\player.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\plyrlist.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\predicat.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\privtab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\ptab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\rob.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\services.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\set.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\shs.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\sig.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\speech.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strdup.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strtree.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strutil.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\tables.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\timer.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\unparse.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\utils.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\version.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\warnings.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\wild.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\wiz.c ! # End Source File ! # End Target ! # End Project ! ! --- 1,427 ---- ! # Microsoft Developer Studio Project File - Name="pennmush" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Console Application" 0x0103 ! ! CFG=pennmush - Win32 SSL Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "pennmush.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "pennmush.mak" CFG="pennmush - Win32 SSL Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "pennmush - Win32 Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "pennmush - Win32 Debug" (based on "Win32 (x86) Console Application") ! !MESSAGE "pennmush - Win32 SSL Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "pennmush - Win32 SSL Debug" (based on "Win32 (x86) Console Application") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! CPP=cl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "pennmush - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /Ob0 /I "./hdrs" /I "./" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /I /Win32" " /c ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 user32.lib winmm.lib wsock32.lib /nologo /subsystem:console /machine:I386 ! ! !ELSEIF "$(CFG)" == "pennmush - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /ZI /I "./win32" /I "./hdrs" /I "./" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # SUBTRACT CPP /Ox /Ot /Os ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib user32.lib winmm.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! ! !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "pennmush___Win32_SSL_Release" ! # PROP BASE Intermediate_Dir "pennmush___Win32_SSL_Release" ! # PROP BASE Ignore_Export_Lib 0 ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /MD /W3 /GX /O2 /Ob0 /I "./hdrs" /I "./" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /I /Win32" " /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /Ob0 /I "./hdrs" /I "./" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /I /Win32" " /c ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0xc09 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 user32.lib winmm.lib wsock32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 user32.lib winmm.lib wsock32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /pdb:"pennmush.pdb" /machine:I386 ! ! !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "pennmush___Win32_SSL_Debug" ! # PROP BASE Intermediate_Dir "pennmush___Win32_SSL_Debug" ! # PROP BASE Ignore_Export_Lib 0 ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "./game" ! # PROP Intermediate_Dir "./src" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! # ADD BASE CPP /nologo /MD /W3 /GX /ZI /I "./win32" /I "./hdrs" /I "./" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # SUBTRACT BASE CPP /Ox /Ot /Os ! # ADD CPP /nologo /MD /W3 /GX /ZI /I "./win32" /I "./hdrs" /I "./" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # SUBTRACT CPP /Ox /Ot /Os ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0xc09 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib user32.lib winmm.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib user32.lib winmm.lib wsock32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! ! !ENDIF ! ! # Begin Target ! ! # Name "pennmush - Win32 Release" ! # Name "pennmush - Win32 Debug" ! # Name "pennmush - Win32 SSL Release" ! # Name "pennmush - Win32 SSL Debug" ! # Begin Source File ! ! SOURCE=.\src\access.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\atr_tab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\attrib.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\boolexp.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\bsd.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\chunk.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cmdlocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cmds.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\command.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\compress.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\conf.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\cque.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\create.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\db.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\destroy.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\extchat.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\extmail.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\filecopy.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\flaglocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\flags.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funcrypt.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\function.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\fundb.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funlist.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funlocal.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funmath.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funmisc.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funstr.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funtime.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\funufun.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\game.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\help.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\htab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\ident.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\local.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\lock.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\log.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\look.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\malias.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\match.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\memcheck.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\move.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mycrypt.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mymalloc.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\mysocket.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\myssl.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\notify.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\parse.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\pcre.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\player.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\plyrlist.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\predicat.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\privtab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\ptab.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\rob.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\services.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\set.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\shs.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\sig.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\speech.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strdup.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strtree.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\strutil.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\tables.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\timer.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\unparse.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\utils.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\version.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\warnings.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\wild.c ! # End Source File ! # Begin Source File ! ! SOURCE=.\src\wiz.c ! # End Source File ! # End Target ! # End Project *** 1_7_7.673/win32/options.h Mon, 10 Sep 2001 15:21:06 -0500 dunemush (pennmush/f/11_options.h 1.3 660) --- 1_7_7.692(w)/win32/options.h Sat, 22 Feb 2003 16:47:44 -0600 dunemush (pennmush/f/11_options.h 1.4 666) *************** *** 11,17 **** * latent bugs. If you change any of them from the default, PLEASE check * to make sure that you know the full effects of what you are changing. And * if you encounter any errors or compile time problems with any options ! * other than the default settings, PLEASE inform * pennmush-bugs@pennmush.org * immediately, so that they can be fixed. The same goes for any other bug * you might find in using this software. All efforts will be made to fix --- 11,17 ---- * latent bugs. If you change any of them from the default, PLEASE check * to make sure that you know the full effects of what you are changing. And * if you encounter any errors or compile time problems with any options ! * other than the default settings, PLEASE inform * pennmush-bugs@pennmush.org * immediately, so that they can be fixed. The same goes for any other bug * you might find in using this software. All efforts will be made to fix *************** *** 29,80 **** * and so desire. This value determines how encryption should be done: * 0 -- Don't encrypt passwords, store them as plaintext. * Highly portable, and highly insecure. Not recommended. ! * 1 -- Encrypt passwords using the system crypt(3) function. ! * Recommended for loading dbs from Unix systems that were ! * compiled this way, but not for starting new MUSHes. * 2 -- Encrypt passwords using SHS. SHS works under both Windows and * Unix and if your passwords are encrypted with SHS, you can move * your db between platforms without any trouble. Recommended for * new databases. * 3 -- Encrypt passwords using SHS. When checking passwords, if * SHS doesn't match, try crypt(3). Replaces matched crypt-ed ! * passwords with SHS encrypted versions. Recommended if you used * to use just crypt(3), to make changing to a system we have better * control over painless. * 4 -- Like #3, but uses plaintext instead of crypt(3). Use with a database * that used CRYPT_SYSTEM 0. (For security reasons, passwords starting * with XX will not be compared for plaintext matches). */ ! #define CRYPT_SYSTEM 2 /* Malloc package options */ /* malloc() is the routine that allocates memory while the MUSH is * running. Because mallocs vary a lot from operating system to operating * system, you can choose to use one of the mallocs we provide instead of ! * your operating system's malloc. * Set the value of MALLOC_PACKAGE to one of these values: * 0 -- Use my system's malloc. Required for Win32 systems. ! * Recommended for FreeBSD, Linux, Mac OS X, and other operating systems * where you think the malloc routines are efficient and debugged. * Otherwise, use only as a last resort. ! * 1 -- Use the CSRI malloc package in normal mode. * Recommended for most operating systems where system malloc is * suspect. Known to work well on SunOS 4.1.x. ! * 2 -- Use the CSRI malloc package in debug mode. * Only use this if you're tracking down memory leaks. Don't use * for a production MUSH - it's slow. ! * 5 -- Use the GNU malloc (gmalloc) package. * Doesn't work on Alpha processors or FreeBSD systems, and * reportedly flaky on Linux. Requires an ANSI compiler. * Otherwise, similar to CSRI malloc. ! * 3, 4, 6 -- Same as 0, kept for compatibility. */ ! #define MALLOC_PACKAGE 0 /* What type of attribute compression should the MUSH use? * Your options are: ! * 1 - the default Huffman compression which has been in use since ! * pl10. In theory, this should be the best compression, * possibly at the cost of some speed. It is also 8-bit clean, * and thus suitable for locales that use extended character sets. * Sometimes has trouble on some linux systems for some reason. --- 29,78 ---- * and so desire. This value determines how encryption should be done: * 0 -- Don't encrypt passwords, store them as plaintext. * Highly portable, and highly insecure. Not recommended. ! * 1 -- Same as 3, kept for backward compatibility * 2 -- Encrypt passwords using SHS. SHS works under both Windows and * Unix and if your passwords are encrypted with SHS, you can move * your db between platforms without any trouble. Recommended for * new databases. * 3 -- Encrypt passwords using SHS. When checking passwords, if * SHS doesn't match, try crypt(3). Replaces matched crypt-ed ! * passwords with SHS encrypted versions. Recommended if you used * to use just crypt(3), to make changing to a system we have better * control over painless. * 4 -- Like #3, but uses plaintext instead of crypt(3). Use with a database * that used CRYPT_SYSTEM 0. (For security reasons, passwords starting * with XX will not be compared for plaintext matches). */ ! #define CRYPT_SYSTEM 2 /* Malloc package options */ /* malloc() is the routine that allocates memory while the MUSH is * running. Because mallocs vary a lot from operating system to operating * system, you can choose to use one of the mallocs we provide instead of ! * your operating system's malloc. * Set the value of MALLOC_PACKAGE to one of these values: * 0 -- Use my system's malloc. Required for Win32 systems. ! * Recommended for FreeBSD, Linux, Mac OS X/Darwin, and other OS's * where you think the malloc routines are efficient and debugged. * Otherwise, use only as a last resort. ! * 1 -- Use the CSRI malloc package in normal mode. * Recommended for most operating systems where system malloc is * suspect. Known to work well on SunOS 4.1.x. ! * 2 -- Use the CSRI malloc package in debug mode. * Only use this if you're tracking down memory leaks. Don't use * for a production MUSH - it's slow. ! * 5 -- Use the GNU malloc (gmalloc) package. * Doesn't work on Alpha processors or FreeBSD systems, and * reportedly flaky on Linux. Requires an ANSI compiler. * Otherwise, similar to CSRI malloc. ! * 3, 4, 6 -- Same as 0, kept for compatibility. */ ! #define MALLOC_PACKAGE 0 /* What type of attribute compression should the MUSH use? * Your options are: ! * 1 - the default Huffman compression which has been in use for a ! * long time. In theory, this should be the best compression, * possibly at the cost of some speed. It is also 8-bit clean, * and thus suitable for locales that use extended character sets. * Sometimes has trouble on some linux systems for some reason. *************** *** 96,104 **** * the in-memory compression of attribute/mail text, not the disk * db compression. Recommend to keep it at 1. When in doubt, try them * all, and check @uptime's memory usage stats for the most efficient ! * choice among those that are stable for you. */ ! #define COMPRESSION_TYPE 3 /*------------------------- Other internals ----------------------*/ --- 94,104 ---- * the in-memory compression of attribute/mail text, not the disk * db compression. Recommend to keep it at 1. When in doubt, try them * all, and check @uptime's memory usage stats for the most efficient ! * choice among those that are stable for you. When using word-based ! * compression, you can also #define COMP_STATS to get some detailed ! * information in @stats/tables. */ ! #define COMPRESSION_TYPE 4 /*------------------------- Other internals ----------------------*/ *************** *** 117,132 **** */ /* #define MEM_CHECK /* */ - /* Defining this will add 4 bytes to every object in memory, and that is - * the local_data void *pointer. - * Usefull for local hackers, who can store stuff like skills, languages, - * combat stats etc in a record this points to, and then store/reload it - * in the local_* hooks. - * If you are NOT one of those who modify the local C source extensivly, - * this will be COMPLETELY worthless to you. - */ - /* #define LOCAL_DATA /* */ - /* If defined, use the info_slave to get information from identd, * instead of having the MUSH do it directly. This may help reduce lag * from new logins. This does _not_ work under Win32. --- 117,122 ---- *************** *** 137,143 **** * thread model instead of the bsd socket layer, for vastly better * performance. Doesn't work on Win 95/98. By Nick Gammon */ ! /* #define NT_TCP /* */ /*------------------------- MUSH Features ----------------------*/ --- 127,133 ---- * thread model instead of the bsd socket layer, for vastly better * performance. Doesn't work on Win 95/98. By Nick Gammon */ ! /* #define NT_TCP */ /*------------------------- MUSH Features ----------------------*/ *************** *** 147,172 **** * the same name. Also, the 2 parameter versions of zone(), parent(), * and lock() are enabled by this define. */ ! /* #define FUNCTION_SIDE_EFFECTS /* */ ! /* Comment this out if you don't wish to use the built-in mail system. * The @mail command provides a flexible hardcoded mail system, which ! * uses its own database to store messages. */ #define USE_MAILER /* */ ! /* ! * Defining MAIL_SUBJECTS adds subject lines to @mail. This modifies ! * the maildb format, but you can reverse it. ! */ ! #define MAIL_SUBJECTS /* */ ! ! /* Defining ALLOW_NOSUBJECT (which only applies if MAIL_SUBJECTS ! * is defined) marks mail sent with no subject as having subject ! * '(no subject)'. The default is for the subject of the mail to * be the first 30 characters of the message when not specfied */ ! /* #define ALLOW_NOSUBJECT /* */ /* * Should we have mail aliases (@mailing lists?). This modifies --- 137,155 ---- * the same name. Also, the 2 parameter versions of zone(), parent(), * and lock() are enabled by this define. */ ! #define FUNCTION_SIDE_EFFECTS /* */ ! /* Comment this out if you don't wish to use the built-in mail system. * The @mail command provides a flexible hardcoded mail system, which ! * uses its own database to store messages. */ #define USE_MAILER /* */ ! /* Defining ALLOW_NOSUBJECT marks mail sent with no subject as having ! * subject '(no subject)'. The default is for the subject of the mail to * be the first 30 characters of the message when not specfied */ ! #define ALLOW_NOSUBJECT /* */ /* * Should we have mail aliases (@mailing lists?). This modifies *************** *** 176,184 **** /* The chat channels system allows players to talk cross-MUSH to each * other, without needing to be in the same room. Whether or not you ! * want this depends on what type of MUSH you want. */ ! /* #define CHAT_SYSTEM /* */ /* Many MUSHes want to change the +channels to =channels. That's * annoying. So we've got this CHAT_TOKEN_ALIAS, which allows + as well --- 159,167 ---- /* The chat channels system allows players to talk cross-MUSH to each * other, without needing to be in the same room. Whether or not you ! * want this depends on what type of MUSH you want. */ ! #define CHAT_SYSTEM /* */ /* Many MUSHes want to change the +channels to =channels. That's * annoying. So we've got this CHAT_TOKEN_ALIAS, which allows + as well *************** *** 186,234 **** * the character you want to use in addition to +, enclosed in * single quotes, as in '=' or '.' or whatever. Don't define it to '+'! */ ! /* #define CHAT_TOKEN_ALIAS '=' /* Many MUSHes want to change the +channels to =channels. That's ! * annoying. So we've got this CHAT_TOKEN_ALIAS, which allows + as well ! * as = (or whatever) channels. If you want this, define it to be ! * the character you want to use in addition to +, enclosed in ! * single quotes, as in '=' or '.' or whatever. Don't define it to '+'! ! */ /* Quotas limit players to a fixed number of objects. ! * Wizards can check and set quotas on players. * See also restricted_building in game/mush.cnf for another way * to slow database growth. */ ! /* #define QUOTA /* */ ! ! /* ! * Define the following to enable the ROYALTY flag. Players with ! * this flag set have limited wiz powers: ie, they can look, examine, ! * and @tel like wizards, but may not change things like wizards. ! */ ! #define ROYALTY_FLAG /* */ /*------------------------------ DB ----------------------------------*/ - /* If defined, enables the MUSH Building Warning system, which checks - * for various building problems at a configurable interval or at - * a player's request. Pretty neat stuff. Will typically add 4 bytes to each - * object in memory. Recommended. - */ - /* #define USE_WARNINGS /* */ - - /* If defined, enables tracking of creation times for all objects, - * attribute modification times for non-player objects, - * and number of login failures for player objects. - * Will typically add 8 bytes to each object in memory - * Tracking login failures and modification times is a good security - * measure, too. Also enables the ctime() and mtime() functions. - * On the whole, recommended unless you're really pinched for memory - * (i.e., for a 10,000 object db, you can't afford using another 80kb) - * - */ - /* #define CREATION_TIMES /* */ - /* With EMPTY_ATTRS, empty (no value) attributes are retained on * objects, keeping their attribute flags and locked status. * Without this option, such attributes are fully deleted. --- 169,186 ---- * the character you want to use in addition to +, enclosed in * single quotes, as in '=' or '.' or whatever. Don't define it to '+'! */ ! #define CHAT_TOKEN_ALIAS '=' /* */ /* Quotas limit players to a fixed number of objects. ! * Wizards can check and set quotas on players. * See also restricted_building in game/mush.cnf for another way * to slow database growth. */ ! #define QUOTA /* */ /*------------------------------ DB ----------------------------------*/ /* With EMPTY_ATTRS, empty (no value) attributes are retained on * objects, keeping their attribute flags and locked status. * Without this option, such attributes are fully deleted. *************** *** 240,264 **** /*------------------------------ FLAGS --------------------------------*/ - /* The fixed flag, when set on a player, prevents the player or anything - * they own from using @tel or home (roy/wizzes exempted from @tel - * restriction) Nice for enforcing IC travel. :) - * The only exception is that players are permitted to @tel their objects - * to their inventory - which makes coding puppets to follow you possible. - */ - #define FIXED_FLAG /* */ - /* If defined, enables the Jury and Judge flags, which don't do anything ! * in themselves, but which other MUSHes may find useful */ ! /* #define JURY_OK /* */ /* If defined, adds support for the UNREGISTERED flag, which you can * arrange in mush.cnf to have set on new players, and can test for. * The only hardcoded restriction is in wiz.c - unreg'd players can't * be given powers */ ! /* #define ONLINE_REG /* */ /* If defined, adds support for the ON_VACATION flag, which a player * can set to indicate that they're going to be away from the MUSH --- 192,208 ---- /*------------------------------ FLAGS --------------------------------*/ /* If defined, enables the Jury and Judge flags, which don't do anything ! * in themselves, but which other MUSHes may find useful */ ! #define JURY_OK /* */ /* If defined, adds support for the UNREGISTERED flag, which you can * arrange in mush.cnf to have set on new players, and can test for. * The only hardcoded restriction is in wiz.c - unreg'd players can't * be given powers */ ! #define ONLINE_REG /* */ /* If defined, adds support for the ON_VACATION flag, which a player * can set to indicate that they're going to be away from the MUSH *************** *** 267,282 **** * cleared when a player logs in, so it should be set just before the * player leaves for vacation */ ! /* #define VACATION_FLAG /* */ /* If defined, adds the UNINSPECTED flag for rooms, which does nothing, * but can be tested for in mushcode, etc. */ ! /* #define UNINSPECTED_FLAG /* */ /*------------------------- Cosmetic Features --------------------*/ ! /* If you're using the email registration feature, but want to * use a mailer other than sendmail, put the full path to the mailer * program here. The mailer must accept the -t command-line * argument ("get the recipient address from the message header To:"). --- 211,226 ---- * cleared when a player logs in, so it should be set just before the * player leaves for vacation */ ! #define VACATION_FLAG /* */ /* If defined, adds the UNINSPECTED flag for rooms, which does nothing, * but can be tested for in mushcode, etc. */ ! #define UNINSPECTED_FLAG /* */ /*------------------------- Cosmetic Features --------------------*/ ! /* If you're using the email registration feature, but want to * use a mailer other than sendmail, put the full path to the mailer * program here. The mailer must accept the -t command-line * argument ("get the recipient address from the message header To:"). *************** *** 293,302 **** * and player commands. The defaults are listed below. */ ! #define CHECKLOG "log/checkpt.log" ! #define CONNLOG "log/connect.log" ! #define WIZLOG "log/wizard.log" ! #define TRACELOG "log/trace.log" ! #define CMDLOG "log/command.log" #endif --- 237,246 ---- * and player commands. The defaults are listed below. */ ! #define CHECKLOG "log/checkpt.log" ! #define CONNLOG "log/connect.log" ! #define WIZLOG "log/wizard.log" ! #define TRACELOG "log/trace.log" ! #define CMDLOG "log/command.log" #endif *** 1_7_7.673/win32/funs.h Tue, 23 Sep 2003 20:11:09 -0500 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8.2.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.8.1.3.1.7.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3 660) --- 1_7_7.692(w)/win32/funs.h Fri, 10 Oct 2003 07:58:16 -0500 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8.2.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.8.1.3.1.7.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.6 660) *************** *** 19,24 **** --- 19,25 ---- FUNCTION_PROTO(fun_atat); FUNCTION_PROTO(fun_atrlock); FUNCTION_PROTO(fun_band); + FUNCTION_PROTO(fun_baseconv); FUNCTION_PROTO(fun_beep); FUNCTION_PROTO(fun_before); FUNCTION_PROTO(fun_bnand); *************** *** 48,53 **** --- 49,55 ---- FUNCTION_PROTO(fun_convtime); FUNCTION_PROTO(fun_cor); FUNCTION_PROTO(fun_cos); + FUNCTION_PROTO(fun_cowner); FUNCTION_PROTO(fun_create); FUNCTION_PROTO(fun_ctime); FUNCTION_PROTO(fun_ctitle); *************** *** 59,64 **** --- 61,67 ---- FUNCTION_PROTO(fun_delete); FUNCTION_PROTO(fun_die); FUNCTION_PROTO(fun_dig); + FUNCTION_PROTO(fun_digest); FUNCTION_PROTO(fun_dist2d); FUNCTION_PROTO(fun_dist3d); FUNCTION_PROTO(fun_div); *** 1_7_7.673/game/txt/hlp/pennvOLD.hlp Mon, 29 Sep 2003 17:14:16 -0500 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.3 660) --- 1_7_7.692(w)/game/txt/hlp/pennvOLD.hlp Fri, 10 Oct 2003 08:03:02 -0500 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.4 660) *************** *** 4418,4424 **** type 'help p'. For example, 'help 1.7.2p3' 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ! 19, 20, 21, 22 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, --- 4418,4424 ---- type 'help p'. For example, 'help 1.7.2p3' 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ! 19, 20, 21, 22, 23 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, *** 1_7_7.673/game/txt/hlp/pennv177.hlp Wed, 01 Oct 2003 10:07:19 -0500 dunemush (pennmush/g/34_pennv177.h 1.158 660) --- 1_7_7.692(w)/game/txt/hlp/pennv177.hlp Fri, 10 Oct 2003 08:03:01 -0500 dunemush (pennmush/g/34_pennv177.h 1.169 660) *************** *** 1,4 **** ! & 1.7.7p22 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions --- 1,4 ---- ! & 1.7.7p23 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions *************** *** 11,16 **** --- 11,45 ---- A list of the patchlevels associated with each release can be read in 'help patchlevels'. + Version 1.7.7 patchlevel 23 October 10, 2003 + + Major Changes: + * Forking dumps now work with the chunk memory manager. [TAP] + Minor Changes: + * Chunk allocator improvements in partial read/writes and for + Win32. [TAP] + * Use the SHA0 algorithm from OpenSSL instead of our own when possible. [SW] + Functions: + * New digest() function for generating checksums via a variety of + algorithms. [SW] + * cowner() returns the dbref of a channel's owner. Suggested by + Sholevi@M*U*S*H. [SW] + * Added baseconv(), for converting numbers from one base to another. + Useful for tweaking things like Myrddin's bboard code. Suggested + by many people. [SW] + Fixes: + * Remove warnings in set.c and pcre.c. Report by Nymeria@M*U*S*H + * @power messages now show the canonical name of the power. + Suggested by Cheetah@M*U*S*H. + * Adding DARK players to channels produced a duplicated message. + Reported by Mystery8@ST:AW. + * Players set WIZARD and ROYALTY would get double notification + of some GAME: messages. Fixed now. [SW] + * Chatdb corruption possible when admin add players to channels. + Reported by several folks, diagnosed by Mordie@M*U*S*H. + + + & 1.7.7p22 Version 1.7.7 patchlevel 22 September 30, 2003 Minor Changes: *************** *** 24,30 **** Fixes: * Attempting to unset attribute flags actually set them. Report by Ambrosia@M*U*S*H. [SW] - * Remove a warning in set.c. Report by Nymeria@M*U*S*H & 1.7.7p21 --- 53,58 ---- *** 1_7_7.673/hdrs/chunk.h Mon, 11 Aug 2003 14:10:25 -0500 dunemush (pennmush/g/37_chunk.h 1.4 660) --- 1_7_7.692(w)/hdrs/chunk.h Fri, 10 Oct 2003 08:02:59 -0500 dunemush (pennmush/g/37_chunk.h 1.4.1.1 660) *************** *** 25,28 **** --- 25,33 ---- void chunk_stats(dbref player, int which); void chunk_new_period(void); + int chunk_fork_file(void); + void chunk_fork_parent(void); + void chunk_fork_child(void); + void chunk_fork_done(void); + #endif /* _CHUNK_H_ */ *** 1_7_7.673/src/chunk.c Tue, 02 Sep 2003 21:18:49 -0500 dunemush (pennmush/g/38_chunk.c 1.26 660) --- 1_7_7.692(w)/src/chunk.c Fri, 10 Oct 2003 08:02:55 -0500 dunemush (pennmush/g/38_chunk.c 1.31 660) *************** *** 537,543 **** --- 537,552 ---- */ /** Swap File */ + #ifdef WIN32 + typedef HANDLE fd_type; + static HANDLE swap_fd; + static HANDLE swap_fd_child = INVALID_HANDLE_VALUE; + #else + typedef int fd_type; static int swap_fd; + static int swap_fd_child = -1; + #endif + static char child_filename[300]; /** Deref scale control. * When the deref counts get too big, the current period is incremented *************** *** 1109,1114 **** --- 1118,1243 ---- * Utility Routines - Cache */ + /** Read a region from a file. + * \param fd file to read from + * \param rhp region buffer to use + * \param region region to read + */ + static void + read_cache_region(fd_type fd, RegionHeader * rhp, u_int_16 region) + { + off_t file_offset = region * REGION_SIZE; + int j; + char *pos; + size_t remaining; + int done; + + /* Try to seek up to 3 times... */ + for (j = 0; j < 3; j++) + #ifdef WIN32 + if (SetFilePointer(fd, file_offset, NULL, FILE_BEGIN) == file_offset) + break; + #else + if (lseek(fd, file_offset, SEEK_SET) == file_offset) + break; + #endif + if (j >= 3) + #ifdef WIN32 + panic(tprintf("chunk swap file seek, GetLastError %d", GetLastError())); + #else + panic(tprintf("chunk swap file seek, errno %d: %s", + errno, strerror(errno))); + #endif + pos = (char *) rhp; + remaining = REGION_SIZE; + for (j = 0; j < 10; j++) { + #ifdef WIN32 + if (!ReadFile(fd, pos, remaining, &done, NULL)) { + /* nothing */ + } + #else + done = read(fd, pos, remaining); + #endif + if (done >= 0) { + remaining -= done; + pos += done; + if (!remaining) + return; + } + #ifndef WIN32 + if (done == -1 && errno == EAGAIN) + sleep(0); + #endif + } + #ifdef WIN32 + panic(tprintf("chunk swap file read, %d remaining, GetLastError %d", + remaining, GetLastError())); + #else + panic(tprintf("chunk swap file read, %d remaining, errno %d: %s", + remaining, errno, strerror(errno))); + #endif + } + + /** Write a region from a file. + * \param fd file to write to + * \param rhp region buffer to use + * \param region region to write + */ + static void + write_cache_region(fd_type fd, RegionHeader * rhp, u_int_16 region) + { + off_t file_offset = region * REGION_SIZE; + int j; + char *pos; + size_t remaining; + int done; + + /* Try to seek up to 3 times... */ + for (j = 0; j < 3; j++) + #ifdef WIN32 + if (SetFilePointer(fd, file_offset, NULL, FILE_BEGIN) == file_offset) + break; + #else + if (lseek(fd, file_offset, SEEK_SET) == file_offset) + break; + #endif + if (j >= 3) + #ifdef WIN32 + panic(tprintf("chunk swap file seek, GetLastError %d", GetLastError())); + #else + panic(tprintf("chunk swap file seek, errno %d: %s", + errno, strerror(errno))); + #endif + pos = (char *) rhp; + remaining = REGION_SIZE; + for (j = 0; j < 10; j++) { + #ifdef WIN32 + if (!WriteFile(fd, pos, remaining, &done, NULL)) { + /* nothing */ + } + #else + done = write(fd, pos, remaining); + #endif + if (done >= 0) { + remaining -= done; + pos += done; + if (!remaining) + return; + } + #ifndef WIN32 + if (done == -1 && errno == EAGAIN) + sleep(0); + #endif + } + #ifdef WIN32 + panic(tprintf("chunk swap file write, %d remaining, GetLastError %d", + remaining, GetLastError())); + #else + panic(tprintf("chunk swap file write, %d remaining, errno %d: %s", + remaining, errno, strerror(errno))); + #endif + } + /** Find space in the cache. * This is likely to require paging out something. * \return a pointer to an available cache region. *************** *** 1116,1122 **** static RegionHeader * find_available_cache_region(void) { - off_t file_offset; RegionHeader *rhp; if (!cache_tail || --- 1245,1250 ---- *************** *** 1139,1157 **** return cache_tail; /* page the current occupant out */ - file_offset = cache_tail->region_id * REGION_SIZE; #ifdef DEBUG_CHUNK_PAGING do_rawlog(LT_TRACE, "CHUNK: Paging out region %04x (offset %08x)", cache_tail->region_id, (unsigned) file_offset); #endif ! if (lseek(swap_fd, file_offset, SEEK_SET) != file_offset) { ! /* FIXME: what about EINTR? */ ! panic("chunk swap file seek"); ! } ! if (write(swap_fd, (char *) cache_tail, REGION_SIZE) != REGION_SIZE) { ! /* FIXME: what about EINTR? */ ! panic("chunk swap file write"); ! } /* keep statistics */ stat_paging_histogram[RegionDerefs(cache_tail->region_id)]++; stat_page_out++; --- 1267,1277 ---- return cache_tail; /* page the current occupant out */ #ifdef DEBUG_CHUNK_PAGING do_rawlog(LT_TRACE, "CHUNK: Paging out region %04x (offset %08x)", cache_tail->region_id, (unsigned) file_offset); #endif ! write_cache_region(swap_fd, cache_tail, cache_tail->region_id); /* keep statistics */ stat_paging_histogram[RegionDerefs(cache_tail->region_id)]++; stat_page_out++; *************** *** 1197,1203 **** { Region *rp = regions + region; RegionHeader *rhp, *prev, *next; - off_t file_offset = region * REGION_SIZE; u_int_32 offset; unsigned int shift; --- 1317,1322 ---- *************** *** 1215,1228 **** do_rawlog(LT_TRACE, "CHUNK: Paging in region %04x (offset %08x)", region, (unsigned) file_offset); #endif ! if (lseek(swap_fd, file_offset, SEEK_SET) != file_offset) { ! /* FIXME: what about EINTR? */ ! panic("chunk swap file seek"); ! } ! if (read(swap_fd, (char *) rhp, REGION_SIZE) != REGION_SIZE) { ! /* FIXME: what about EINTR? */ ! panic("chunk swap file read"); ! } /* link the region to its cache entry */ rp->in_memory = rhp; --- 1334,1340 ---- do_rawlog(LT_TRACE, "CHUNK: Paging in region %04x (offset %08x)", region, (unsigned) file_offset); #endif ! read_cache_region(swap_fd, rhp, region); /* link the region to its cache entry */ rp->in_memory = rhp; *************** *** 2404,2413 **** #endif do { worked = 0; ! for (rhp = cache_head; rhp; rhp = rhp->next) while (m_limit && migrate_hardpack(rhp->region_id)) { worked = 1; } } while (worked); /* Then, shift crap away */ --- 2516,2528 ---- #endif do { worked = 0; ! for (rhp = cache_head; rhp; rhp = rhp->next) { ! if (rhp->region_id == INVALID_REGION_ID) ! continue; while (m_limit && migrate_hardpack(rhp->region_id)) { worked = 1; } + } } while (worked); /* Then, shift crap away */ *************** *** 2427,2436 **** #endif do { worked = 0; ! for (rhp = cache_head; rhp; rhp = rhp->next) while (m_limit && migrate_softpack(rhp->region_id)) { worked = 1; } } while (worked); #ifdef DEBUG_CHUNK_MIGRATE_LOUD do_rawlog(LT_TRACE, "CHUNK: Migration finished"); --- 2542,2554 ---- #endif do { worked = 0; ! for (rhp = cache_head; rhp; rhp = rhp->next) { ! if (rhp->region_id == INVALID_REGION_ID) ! continue; while (m_limit && migrate_softpack(rhp->region_id)) { worked = 1; } + } } while (worked); #ifdef DEBUG_CHUNK_MIGRATE_LOUD do_rawlog(LT_TRACE, "CHUNK: Migration finished"); *************** *** 2471,2479 **** --- 2589,2604 ---- ASSERT(UNHAPPINESS_AWAY_THRESHOLD > (REGION_CAPACITY - MIN_REMNANT_LEN) / UNHAPPINESS_SPACE_DIVISOR); + #ifdef WIN32 + swap_fd = CreateFile(CHUNK_SWAP_FILE, GENERIC_READ | GENERIC_WRITE, + 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + if (swap_fd == INVALID_HANDLE_VALUE) + panic(tprintf("Cannot open swap file: %d", GetLastError())); + #else swap_fd = open(CHUNK_SWAP_FILE, O_RDWR | O_TRUNC | O_CREAT, 0600); if (swap_fd < 0) panic(tprintf("Cannot open swap file: %s", strerror(errno))); + #endif curr_period = 0; cached_region_count = 0; *************** *** 2587,2589 **** --- 2712,2797 ---- rp->period_last_touched = curr_period; } } + + #ifndef WIN32 + /** Clone the chunkswap file for forking dumps. + * \retval 0 if unable to clone the swap file + * \retval 1 if swap file clone succeeded + */ + int + chunk_fork_file(void) + { + unsigned int j; + RegionHeader *rhp, *prev, *next; + + /* abort if already cloned */ + if (swap_fd_child >= 0) + return 0; + + j = 0; + for (;;) { + sprintf(child_filename, "%s.%d", CHUNK_SWAP_FILE, j); + swap_fd_child = open(child_filename, O_RDWR | O_EXCL | O_CREAT, 0600); + if (swap_fd_child >= 0) + break; + if (j >= 10) + return 0; + j++; + } + + rhp = find_available_cache_region(); + prev = rhp->prev; + next = rhp->next; + for (j = 0; j < region_count; j++) { + if (regions[j].in_memory) + continue; + + read_cache_region(swap_fd, rhp, j); + write_cache_region(swap_fd_child, rhp, j); + } + rhp->region_id = INVALID_REGION_ID; + rhp->prev = prev; + rhp->next = next; + + return 1; + } + + /** Assert that we're the parent after fork. + */ + void + chunk_fork_parent(void) + { + if (swap_fd_child < 0) + return; + + close(swap_fd_child); + swap_fd_child = -1; + } + + /** Assert that we're the child after fork. + */ + void + chunk_fork_child(void) + { + if (swap_fd_child < 0) + return; + + close(swap_fd); + swap_fd = swap_fd_child; + swap_fd_child = -1; + } + + /** Assert that we're done with the cloned chunkswap file. + */ + void + chunk_fork_done(void) + { + if (swap_fd_child < 0) + close(swap_fd); + else + close(swap_fd_child); + + unlink(child_filename); + swap_fd_child = -1; + } + #endif /* !WIN32 */ *** 1_7_7.673/src/myssl.c Mon, 18 Aug 2003 20:59:29 -0500 dunemush (pennmush/g/40_myssl.c 1.17 660) --- 1_7_7.692(w)/src/myssl.c Fri, 10 Oct 2003 08:02:57 -0500 dunemush (pennmush/g/40_myssl.c 1.18 660) *************** *** 73,78 **** --- 73,79 ---- #include #include #include + #include #include "conf.h" #include "mysocket.h" *************** *** 179,184 **** --- 180,188 ---- strncpy(context, MUDNAME, 128); SSL_CTX_set_session_id_context(ctx, (void *) &context, sizeof context); + /* Load hash algorithms */ + OpenSSL_add_all_digests(); + return ctx; } *** 1_7_7.673/test/testdigest.pl Fri, 10 Oct 2003 08:03:11 -0500 dunemush () --- 1_7_7.692(w)/test/testdigest.pl Tue, 07 Oct 2003 00:11:11 -0500 dunemush (pennmush/g/51_testdigest 1.1 600) *************** *** 0 **** --- 1,14 ---- + use PennMUSH; + use MUSHConnection; + use TestHarness; + + $mush = PennMUSH->new(); + $god = $mush->loginGod(); + + test('digest.1', $god, 'think digest(md2,foo)', 'd11f8ce29210b4b50c5e67533b699d02'); + test('digest.2', $god, 'think digest(md5,foo)', 'acbd18db4cc2f85cedef654fccc4a4d8'); + test('digest.3', $god, 'think digest(sha,foo)', '752678a483e77799a3651face01d064f9ca86779'); + test('digest.4', $god, 'think digest(sha1,foo)', '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'); + test('digest.5', $god, 'think digest(dss1,foo)', '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'); + test('digest.6', $god, 'think digest(ripemd160,foo)', '42cfa211018ea492fdee45ac637b7972a0ad6873'); + test('digest.7', $god, 'think digest(md4,foo)', '0ac6700c491d70fb8650940b1ca1e4b2');