1.7.2-patch03
patches · 19.3 KB · 2010-03-30
Download « Back to the patches list
This is patch03 to PennMUSH 1.7.2. After applying this patch, you will
have version 1.7.2p3.
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p0 < 1.7.2-patch03
make
If you use GNU patch 2.2, you probably want the above to be 'patch -b -p0',
not just 'patch -p0'.
Then @shutdown and restart your MUSH.
In this patch:
* Bug in @readcache that could cause crashes fixed
* Problems with ansi fixed
* Problems with events fixed
* help pueblo() works
* Various warnings fixed
- Alan/Javelin
Index: Patchlevel
Prereq: 1.7.2p2
*** Patchlevel.orig Thu, 19 Feb 1998 13:26:17 -0600 dunemush (pennmush/h/12_Patchlevel 1.3 640) 0.18
--- Patchlevel Sun, 22 Feb 1998 11:46:01 -0600 dunemush (pennmush/h/12_Patchlevel 1.3 640) 0.18(w)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.2p2
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.2p3
Index: CHANGES
*** CHANGES.orig Thu, 19 Feb 1998 13:26:17 -0600 dunemush (pennmush/h/9_CHANGES 1.7 640) 0.18
--- CHANGES Sun, 22 Feb 1998 11:45:47 -0600 dunemush (pennmush/h/9_CHANGES 1.7 640) 0.18(w)
***************
*** 15,20 ****
--- 15,33 ----
==========================================================================
+ Version 1.7.2 patchlevel 3 February 22, 1998
+
+ Fixes
+ * Fixed a slew of compiler warnings under Win32. [NJG]
+ * Jonathan Booth Removed a few #ifdef EVENTS that lingered.
+ * Room names weren't shown bold to people who had ANSI
+ but not COLOR set. Report by Sylvia
+ * Added help alias pueblo() for pueblo. Suggested by Vedui.
+ * Fixed some problems with ansi() and tf reported by Vedui.
+ * @readcache could cause crashes. First report by Mop-Boy.
+ * src/tcl.c is now better located by Configure. [TN]
+
+
Version 1.7.2 patchlevel 2 February 19, 1998
Fixes:
***************
*** 37,43 ****
Major Changes:
* Support for the Pueblo MUD client (http://www.chaco.com/pueblo)
which allows the MUSH to send html to the client. This is
! runtime configurable with @enable/@disable and mush.cnf. [TAP]
* Regular expression support: the REGEXP attribute flag causes
attributes to match $ and ^ patterns using regular expressions.
regmatch() matches regular expressions. [2.2]
--- 50,56 ----
Major Changes:
* Support for the Pueblo MUD client (http://www.chaco.com/pueblo)
which allows the MUSH to send html to the client. This is
! runtime configurable with @enable/@disable and mush.cnf. [TN]
* Regular expression support: the REGEXP attribute flag causes
attributes to match $ and ^ patterns using regular expressions.
regmatch() matches regular expressions. [2.2]
Index: Configure
*** Configure.orig Wed, 18 Feb 1998 10:48:44 -0600 dunemush (pennmush/d/37_Configure 1.4 750) 0.18
--- Configure Sun, 22 Feb 1998 11:16:39 -0600 dunemush (pennmush/d/37_Configure 1.4 750) 0.18(w)
***************
*** 5825,5831 ****
echo " "
ok=0
! if $test -f src/tcl.c; then
echo "I'm tickled pink - we have the penn TCL source." >&4
echo "Let's see if we have TCL." >&4
--- 5825,5831 ----
echo " "
ok=0
! if $test -f src/tcl.c -o -f ../src/tcl.c ; then
echo "I'm tickled pink - we have the penn TCL source." >&4
echo "Let's see if we have TCL." >&4
Index: hdrs/externs.h
*** hdrs/externs.h.orig Mon, 16 Feb 1998 13:50:13 -0600 dunemush (pennmush/e/1_externs.h 1.2 640) 0.18
--- hdrs/externs.h Fri, 20 Feb 1998 10:38:15 -0600 dunemush (pennmush/e/1_externs.h 1.2 640) 0.18(w)
***************
*** 15,20 ****
--- 15,27 ----
#ifndef __EXTERNS_H
#define __EXTERNS_H
+ /* Get the time_t definition that we use in prototypes here */
+ #ifdef I_SYS_TIME
+ #include <sys/time.h>
+ #else
+ #include <time.h>
+ #endif
+
#include "config.h"
#include "copyrite.h"
#include "conf.h"
***************
*** 327,332 ****
--- 334,340 ----
extern int local_wild_match _((const char *s, const char *d));
extern int quick_wild _((const char *tstr, const char *dstr));
extern int wildcard _((const char *s));
+ extern int regexp_match _((const char *s, const char *d));
/* From wiz.c */
extern void do_chownall _((dbref player, const char *name, const char *target));
Index: hdrs/version.h
*** hdrs/version.h.orig Thu, 19 Feb 1998 13:26:17 -0600 dunemush (pennmush/e/22_version.h 1.3 640) 0.18
--- hdrs/version.h Sun, 22 Feb 1998 11:45:53 -0600 dunemush (pennmush/e/22_version.h 1.3 640) 0.18(w)
***************
*** 1,2 ****
! #define VERSION "PennMUSH version 1.7.2 patchlevel 2 [2/19/98]"
! #define SHORTVN "PennMUSH 1.7.2p2"
--- 1,2 ----
! #define VERSION "PennMUSH version 1.7.2 patchlevel 3 [2/22/98]"
! #define SHORTVN "PennMUSH 1.7.2p3"
Index: src/bsd.c
*** src/bsd.c.orig Wed, 18 Feb 1998 10:48:44 -0600 dunemush (pennmush/e/30_bsd.c 1.3 640) 0.18
--- src/bsd.c Sun, 22 Feb 1998 11:28:01 -0600 dunemush (pennmush/e/30_bsd.c 1.3 640) 0.18(w)
***************
*** 597,603 ****
#define NA_ANSI 1
#define NA_COLOR 2
#define NA_PUEBLO 3
! #define NA_PASCII 1
#define TA_BGC 0
#define TA_FGC 1
--- 597,603 ----
#define NA_ANSI 1
#define NA_COLOR 2
#define NA_PUEBLO 3
! #define NA_PASCII 4
#define TA_BGC 0
#define TA_FGC 1
***************
*** 853,858 ****
--- 853,859 ----
break;
case NA_COLOR:
color = 1;
+ /* FALLTHROUGH */
case NA_ANSI:
while (*p) {
switch (*p) {
***************
*** 885,896 ****
safe_str(ANSI_NORMAL, t, &o);
}
i = 0;
! for (n = 0; n < 4; n++)
! if (newstate[n])
! i = 1;
! if (!i && color && (newstate[4] || newstate[5]))
! i = 1;
! if (i) {
safe_chr(ESC_CHAR, t, &o);
safe_chr('[', t, &o);
i = 0;
--- 886,899 ----
safe_str(ANSI_NORMAL, t, &o);
}
i = 0;
! if (
! (newstate[TA_BOLD] && (newstate[TA_BOLD] != state[TA_BOLD])) ||
! (newstate[TA_REV] && (newstate[TA_REV] != state[TA_REV])) ||
! (newstate[TA_BLINK] && (newstate[TA_BLINK] != state[TA_BLINK])) ||
! (newstate[TA_ULINE] && (newstate[TA_ULINE] != state[TA_ULINE])) ||
! (color && newstate[TA_FGC] && (newstate[TA_FGC] != state[TA_FGC])) ||
! (color && newstate[TA_BGC] && (newstate[TA_BGC] != state[TA_BGC]))
! ) {
safe_chr(ESC_CHAR, t, &o);
safe_chr('[', t, &o);
i = 0;
***************
*** 917,930 ****
}
p++;
}
! i = 0;
! for (n = 0; n < 4; n++)
! if (state[n])
! i = 1;
! if (!i && color && (newstate[4] || newstate[5]))
! i = 1;
! if (i)
safe_str(ANSI_NORMAL, t, &o);
}
*o = '\0';
--- 920,930 ----
}
p++;
}
! if (state[TA_BOLD] || state[TA_REV] ||
! state[TA_BLINK] || state[TA_ULINE] ||
! (color && (state[TA_FGC] || state[TA_BGC])))
safe_str(ANSI_NORMAL, t, &o);
+ break;
}
*o = '\0';
***************
*** 1030,1037 ****
{
dbref target;
dbref passalong[3];
! struct notify_strings messages[4];
! struct notify_strings nospoofs[4];
int i, j;
struct descriptor_data *d;
int poutput;
--- 1030,1037 ----
{
dbref target;
dbref passalong[3];
! struct notify_strings messages[5];
! struct notify_strings nospoofs[5];
int i, j;
struct descriptor_data *d;
int poutput;
***************
*** 1055,1061 ****
target = NOTHING;
! for (i = 0; i < 4; i++) {
nospoofs[i].made = 0;
messages[i].made = 0;
}
--- 1055,1061 ----
target = NOTHING;
! for (i = 0; i < 5; i++) {
nospoofs[i].made = 0;
messages[i].made = 0;
}
***************
*** 1084,1089 ****
--- 1084,1090 ----
} else {
poutput = NA_PASCII;
}
+
if ((flags & NA_PONLY) && (poutput != NA_PUEBLO))
continue;
***************
*** 1677,1682 ****
--- 1678,1684 ----
close(reserved);
if ((fd = open(filename, O_RDONLY, 0)) == -1) {
do_log(LT_ERR, 0, 0, "couldn't open cached text file '%s'", filename);
+ reserved = open("/dev/null", O_RDWR);
return -1;
}
fp = (FBLOCK *) malloc(sizeof(char) * 256);
***************
*** 1730,1738 ****
{
int conn, motd, wiz, new, reg, quit, down, full;
int guest;
! int i = 0;
! for (; i < (SUPPORT_PUEBLO ? 2 : 1); i++) {
conn = fcache_read(&options.connect_fcache[i], options.connect_file[i]);
motd = fcache_read(&options.motd_fcache[i], options.motd_file[i]);
wiz = fcache_read(&options.wizmotd_fcache[i], options.wizmotd_file[i]);
--- 1732,1740 ----
{
int conn, motd, wiz, new, reg, quit, down, full;
int guest;
! int i;
! for (i = 0; i < (SUPPORT_PUEBLO ? 2 : 1); i++) {
conn = fcache_read(&options.connect_fcache[i], options.connect_file[i]);
motd = fcache_read(&options.motd_fcache[i], options.motd_file[i]);
wiz = fcache_read(&options.wizmotd_fcache[i], options.wizmotd_file[i]);
Index: src/cmds.c
*** src/cmds.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/e/31_cmds.c 1.1 640) 0.18
--- src/cmds.c Sat, 21 Feb 1998 11:21:40 -0600 dunemush (pennmush/e/31_cmds.c 1.1 640) 0.18(w)
***************
*** 3,8 ****
--- 3,9 ----
* Parsing is handled in command.c
*/
#include "copyrite.h"
+ #include "config.h"
#ifdef I_STRING
#include <string.h>
***************
*** 10,17 ****
#include <strings.h>
#endif
- #include "config.h"
-
#include "dbdefs.h"
#include "conf.h"
--- 11,16 ----
***************
*** 836,847 ****
do_enter(player, arg_left, 0);
}
- #ifdef EVENTS
COMMAND (cmd_events) {
do_new_spitfile(player, arg_left, EVENTINDX, EVENT_FILE, 0);
}
-
- #endif
COMMAND (cmd_follow) {
notify(player, "COMMAND NOT IMPLEMENTED YET.");
--- 835,843 ----
Index: src/command.c
*** src/command.c.orig Wed, 18 Feb 1998 10:48:44 -0600 dunemush (pennmush/e/32_command.c 1.3 640) 0.18
--- src/command.c Sat, 21 Feb 1998 11:21:40 -0600 dunemush (pennmush/e/32_command.c 1.3 640) 0.18(w)
***************
*** 187,195 ****
{"DROP", NULL, cmd_drop, CMD_T_PLAYER | CMD_T_THING, 0, 0, 0},
{"EXAMINE", "BRIEF DEBUG MORTAL", cmd_examine, CMD_T_ANY, 0, 0, 0},
{"ENTER", NULL, cmd_enter, CMD_T_ANY, 0, 0, 0},
- #ifdef EVENTS
{"EVENTS", NULL, cmd_events, CMD_T_ANY | CMD_T_NOPARSE, 0, 0, 0},
- #endif
#ifdef FOLLOW
{"FOLLOW", NULL, cmd_follow, CMD_T_PLAYER | CMD_T_THING | CMD_T_NOGAGGED, 0, 0, 0},
#endif
--- 187,193 ----
***************
*** 406,412 ****
command_mkalias();
}
! void
command_init_postconfig()
{
if (!*EVENT_FILE)
--- 404,410 ----
command_mkalias();
}
! void
command_init_postconfig()
{
if (!*EVENT_FILE)
Index: src/flags.c
*** src/flags.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/e/48_flags.c 1.1 640) 0.18
--- src/flags.c Fri, 20 Feb 1998 10:37:55 -0600 dunemush (pennmush/e/48_flags.c 1.1 640) 0.18(w)
***************
*** 752,758 ****
static char fbuf[BUFFER_LEN];
char *bp;
FLAG *f;
- int t;
bp = fbuf;
f = flag_table;
--- 752,757 ----
Index: src/funmath.c
*** src/funmath.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/1_funmath.c 1.1 640) 0.18
--- src/funmath.c Fri, 20 Feb 1998 10:37:57 -0600 dunemush (pennmush/f/1_funmath.c 1.1 640) 0.18(w)
***************
*** 650,656 ****
#ifdef FLOATING_POINTS
sum = sqrt(sum);
#else
! sum = sqrt(sum) + 0.5;
#endif /* FLOATING_POINTS */
if (!sum) {
--- 650,656 ----
#ifdef FLOATING_POINTS
sum = sqrt(sum);
#else
! sum = (NVAL) (sqrt(sum) + 0.5);
#endif /* FLOATING_POINTS */
if (!sum) {
Index: src/game.c
*** src/game.c.orig Thu, 19 Feb 1998 13:26:17 -0600 dunemush (pennmush/f/6_game.c 1.3 640) 0.18
--- src/game.c Fri, 20 Feb 1998 10:37:59 -0600 dunemush (pennmush/f/6_game.c 1.3 640) 0.18(w)
***************
*** 1490,1496 ****
/* We do this because on some machines (SGI Irix, for example),
* the popen will not return NULL if the mailfile isn't there.
*/
! f = fopen(tprintf("%s%s", filename, options.compresssuff),"r");
if (f) {
fclose(f);
f = popen(tprintf("%s < %s%s", options.uncompressprog, filename, options.compresssuff), "r");
--- 1490,1496 ----
/* We do this because on some machines (SGI Irix, for example),
* the popen will not return NULL if the mailfile isn't there.
*/
! f = fopen(tprintf("%s%s", filename, options.compresssuff), "r");
if (f) {
fclose(f);
f = popen(tprintf("%s < %s%s", options.uncompressprog, filename, options.compresssuff), "r");
Index: src/ident.c
*** src/ident.c.orig Mon, 16 Feb 1998 14:44:40 -0600 dunemush (pennmush/f/8_ident.c 1.2 640) 0.18
--- src/ident.c Fri, 20 Feb 1998 10:38:00 -0600 dunemush (pennmush/f/8_ident.c 1.2 640) 0.18(w)
***************
*** 251,257 ****
#endif
{
ident_t *id;
! int res, tmperrno;
struct sockaddr_in sin_laddr, sin_faddr;
fd_set rs, ws, es;
#ifndef OLD_SETSOCKOPT
--- 251,260 ----
#endif
{
ident_t *id;
! int res;
! #ifndef WIN32
! int tmperrno;
! #endif
struct sockaddr_in sin_laddr, sin_faddr;
fd_set rs, ws, es;
#ifndef OLD_SETSOCKOPT
***************
*** 406,412 ****
--- 409,417 ----
__STRUCT_TIMEVAL_P timeout;
#endif
{
+ #ifndef WIN32
Signal_t(*old_sig) ();
+ #endif
int res;
char buf[80];
fd_set ws;
Index: src/mkindx.c
*** src/mkindx.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/17_mkindx.c 1.1 640) 0.18
--- src/mkindx.c Fri, 20 Feb 1998 10:38:02 -0600 dunemush (pennmush/f/17_mkindx.c 1.1 640) 0.18(w)
***************
*** 167,173 ****
--- 167,175 ----
char *s, *topic;
char the_topic[TOPIC_NAME_LEN + 1];
FILE *rfp, *wfp;
+ #ifndef EMBEDDED_MKINDX
char c;
+ #endif
#ifdef EMBEDDED_MKINDX
if ((rfp = fopen(inputfile, "rb")) == NULL) {
Index: src/move.c
*** src/move.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/18_move.c 1.1 640) 0.18
--- src/move.c Fri, 20 Feb 1998 10:38:02 -0600 dunemush (pennmush/f/18_move.c 1.1 640) 0.18(w)
***************
*** 1,8 ****
-
-
/* move.c */
#include "copyrite.h"
#include <ctype.h>
#ifdef I_STRING
#include <string.h>
--- 1,8 ----
/* move.c */
#include "copyrite.h"
+ #include "config.h"
+
#include <ctype.h>
#ifdef I_STRING
#include <string.h>
***************
*** 10,16 ****
#include <strings.h>
#endif
- #include "config.h"
#include "conf.h"
#include "mushdb.h"
#include "intrface.h"
--- 10,15 ----
Index: src/regexp.c
*** src/regexp.c.orig Wed, 18 Feb 1998 10:48:44 -0600 dunemush (pennmush/f/27_regexp.c 1.2 600) 0.18
--- src/regexp.c Fri, 20 Feb 1998 10:38:06 -0600 dunemush (pennmush/f/27_regexp.c 1.2 600) 0.18(w)
***************
*** 284,290 ****
longest = NULL;
len = 0;
for (; scan != NULL; scan = regnext(scan))
! if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
longest = OPERAND(scan);
len = strlen(OPERAND(scan));
}
--- 284,290 ----
longest = NULL;
len = 0;
for (; scan != NULL; scan = regnext(scan))
! if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= (Size_t) len) {
longest = OPERAND(scan);
len = strlen(OPERAND(scan));
}
***************
*** 616,622 ****
- regc - emit (if appropriate) a byte of code
*/
#ifdef CAN_NEWSTYLE
! static void
regc(char b)
#else
static void
--- 616,622 ----
- regc - emit (if appropriate) a byte of code
*/
#ifdef CAN_NEWSTYLE
! static void
regc(char b)
#else
static void
***************
*** 636,642 ****
* Means relocating the operand.
*/
#ifdef CAN_NEWSTYLE
! static void
reginsert(char op, char *opnd)
#else
static void
--- 636,642 ----
* Means relocating the operand.
*/
#ifdef CAN_NEWSTYLE
! static void
reginsert(char op, char *opnd)
#else
static void
Index: src/rwho.c
*** src/rwho.c.orig Mon, 16 Feb 1998 14:44:40 -0600 dunemush (pennmush/f/30_rwho.c 1.2 640) 0.18
--- src/rwho.c Fri, 20 Feb 1998 10:38:07 -0600 dunemush (pennmush/f/30_rwho.c 1.2 640) 0.18(w)
***************
*** 43,49 ****
--- 43,51 ----
#else
#include <strings.h>
#endif
+ #ifdef I_UNISTD
#include <unistd.h>
+ #endif
#include "mymalloc.h"
#include "confmagic.h"
Index: src/htab.c
*** src/htab.c.orig Wed, 18 Feb 1998 19:11:27 -0600 dunemush (pennmush/f/39_htab.c 1.3 640) 0.18
--- src/htab.c Fri, 20 Feb 1998 10:38:00 -0600 dunemush (pennmush/f/39_htab.c 1.3 640) 0.18(w)
***************
*** 80,86 ****
HASHTAB *htab;
const char *key;
{
! int hval, numchecks;
HASHENT *hptr;
if (!htab->buckets)
--- 80,86 ----
HASHTAB *htab;
const char *key;
{
! int hval;
HASHENT *hptr;
if (!htab->buckets)
***************
*** 199,205 ****
const char *key;
void *hashdata;
{
- int hval;
HASHENT *hptr;
if (hash_find(htab, key) != NULL) {
--- 199,204 ----
Index: game/txt/hlp/pennpueb.hlp
*** game/txt/hlp/pennpueb.hlp.orig Fri, 13 Feb 1998 14:34:10 -0600 dunemush (pennmush/h/3_pennpueb.h 1.1 600) 0.18
--- game/txt/hlp/pennpueb.hlp Sat, 21 Feb 1998 11:59:50 -0600 dunemush (pennmush/h/3_pennpueb.h 1.1 600) 0.18(w)
***************
*** 1,4 ****
--- 1,5 ----
& PUEBLO
+ & PUEBLO()
Pueblo is a client made by Chaco (http://www.chaco.com/pueblo).
It attempts to MIX HTML with MUSH, and does a very good job at it.
If compiled into the MUSH, PennMUSH offers full support for the
Index: game/txt/hlp/pennvers.hlp
*** game/txt/hlp/pennvers.hlp.orig Thu, 19 Feb 1998 13:26:17 -0600 dunemush (pennmush/h/5_pennvers.h 1.3 640) 0.18
--- game/txt/hlp/pennvers.hlp Sun, 22 Feb 1998 11:47:32 -0600 dunemush (pennmush/h/5_pennvers.h 1.3 640) 0.18(w)
***************
*** 30,35 ****
--- 30,47 ----
1.50p11, 1.50p12, 1.50p13, 1.50p14, 1.50p15, 1.6.0, 1.6.1, 1.6.2,
1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.7.0, 1.7.1
+ Version 1.7.2 patchlevel 3 February 22, 1998
+
+ Fixes
+ * Fixed a slew of compiler warnings under Win32. [NJG]
+ * Jonathan Booth Removed a few #ifdef EVENTS that lingered.
+ * Room names weren't shown bold to people who had ANSI
+ but not COLOR set. Report by Sylvia
+ * Added help alias pueblo() for pueblo. Suggested by Vedui.
+ * Fixed some problems with ansi() and tf reported by Vedui.
+ * @readcache could cause crashes. First report by Mop-Boy.
+ * src/tcl.c is now better located by Configure. [TN]
+
Version 1.7.2 patchlevel 2 February 19, 1998
Fixes:
***************
*** 50,56 ****
Major Changes:
* Support for the Pueblo MUD client (http://www.chaco.com/pueblo)
which allows the MUSH to send html to the client. This is
! runtime configurable with @enable/@disable and mush.cnf. [TAP]
* Regular expression support: the REGEXP attribute flag causes
attributes to match $ and ^ patterns using regular expressions.
regmatch() matches regular expressions. [2.2]
--- 62,68 ----
Major Changes:
* Support for the Pueblo MUD client (http://www.chaco.com/pueblo)
which allows the MUSH to send html to the client. This is
! runtime configurable with @enable/@disable and mush.cnf. [TN]
* Regular expression support: the REGEXP attribute flag causes
attributes to match $ and ^ patterns using regular expressions.
regmatch() matches regular expressions. [2.2]