This is patch07 to PennMUSH 1.7.2. After applying this patch, you will
have version 1.7.2p7.
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p0 < 1.7.2-patch07
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:
* Bugfixes for tiny_math and mid()
* @decompile shows powers
- Alan/Javelin
Index: Patchlevel
Prereq: 1.7.2p6
*** Patchlevel.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/h/12_Patchlevel 1.7 640) 0.22
--- Patchlevel Tue, 10 Mar 1998 15:24:26 -0600 dunemush (pennmush/h/12_Patchlevel 1.7 640) 0.22(w)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.2p6
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.2p7
Index: CHANGES
*** CHANGES.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/h/9_CHANGES 1.10.1.1 640) 0.22
--- CHANGES Tue, 10 Mar 1998 15:24:13 -0600 dunemush (pennmush/h/9_CHANGES 1.10.1.1 640) 0.22(w)
***************
*** 15,20 ****
--- 15,32 ----
==========================================================================
+ Version 1.7.2 patchlevel 7 March 10, 1998
+
+ Fixes:
+ * Typo fixed in pennflag.hlp. Report by Keith Howell.
+ * Bug in mid() that could cause crashes on some OS's when using
+ bad arguments fixed. Report by Yanek@DragonStarMUSH. [TAP]
+ * @wait obj=command fails when tiny_math is defined. Report by Yanek.
+ * With tiny_math defined and tiny_booleans not defined,
+ strings in booleans weren't being treated as 1. Report by Yanek.
+ * @decompile now shows @powers, too. Report by Jonathan Booth.
+
+
Version 1.7.2 patchlevel 6 March 8, 1998
Fixes:
Index: hdrs/externs.h
*** hdrs/externs.h.orig Mon, 23 Feb 1998 14:31:54 -0600 dunemush (pennmush/e/1_externs.h 1.3 640) 0.22
--- hdrs/externs.h Tue, 10 Mar 1998 15:09:54 -0600 dunemush (pennmush/e/1_externs.h 1.3 640) 0.22(w)
***************
*** 312,317 ****
--- 312,318 ----
extern void listadd _((struct dblist * head, dbref ref));
extern void listfree _((struct dblist * head));
extern int is_number _((const char *str));
+ extern int is_strict_number _((const char *str));
extern Malloc_t mush_malloc _((int size, const char *check));
extern void mush_free _((Malloc_t ptr, const char *check));
extern int getrandom _((int x));
Index: hdrs/version.h
*** hdrs/version.h.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/e/22_version.h 1.7 640) 0.22
--- hdrs/version.h Tue, 10 Mar 1998 15:24:22 -0600 dunemush (pennmush/e/22_version.h 1.7 640) 0.22(w)
***************
*** 1,2 ****
! #define VERSION "PennMUSH version 1.7.2 patchlevel 6 [3/8/98]"
! #define SHORTVN "PennMUSH 1.7.2p6"
--- 1,2 ----
! #define VERSION "PennMUSH version 1.7.2 patchlevel 7 [3/10/98]"
! #define SHORTVN "PennMUSH 1.7.2p7"
Index: src/cque.c
*** src/cque.c.orig Wed, 04 Mar 1998 10:11:19 -0600 dunemush (pennmush/e/40_cque.c 1.2 640) 0.22
--- src/cque.c Tue, 10 Mar 1998 15:10:08 -0600 dunemush (pennmush/e/40_cque.c 1.2 640) 0.22(w)
***************
*** 642,648 ****
arg2 = strip_braces(cmd);
! if (is_number(arg1)) {
/* normal wait */
wait_que(player, atoi(arg1), arg2, cause, NOTHING);
mush_free(arg2, "strip_braces.buff");
--- 642,648 ----
arg2 = strip_braces(cmd);
! if (is_strict_number(arg1)) {
/* normal wait */
wait_que(player, atoi(arg1), arg2, cause, NOTHING);
mush_free(arg2, "strip_braces.buff");
Index: src/flags.c
*** src/flags.c.orig Mon, 23 Feb 1998 14:31:54 -0600 dunemush (pennmush/e/48_flags.c 1.2 640) 0.22
--- src/flags.c Tue, 10 Mar 1998 15:21:09 -0600 dunemush (pennmush/e/48_flags.c 1.2 640) 0.22(w)
***************
*** 887,892 ****
--- 887,912 ----
notify(player, tprintf("@set %s = %s", name, f->name));
}
+
+ void
+ decompile_powers(player, thing, name)
+ dbref player;
+ dbref thing;
+ const char *name;
+ {
+ /* print out the powers for a decompile */
+
+ 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 (Powers(thing) & p->flag)
+ notify(player, tprintf("@power %s = %s", name, p->name));
+ }
+ }
+
int
convert_flags(player, s, p_mask, p_toggle, p_type)
dbref player;
Index: src/funlist.c
*** src/funlist.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/0_funlist.c 1.1 640) 0.22
--- src/funlist.c Tue, 10 Mar 1998 15:11:19 -0600 dunemush (pennmush/f/0_funlist.c 1.1 640) 0.22(w)
***************
*** 490,496 ****
for (i = 0; i < nptrs; i++) {
switch (sort_type) {
case NUMERIC_LIST:
! if (!is_number(ptrs[i])) {
/* If we get something non-numeric, switch to an
* alphanumeric guess, unless this is the first
* element and we have a dbref.
--- 490,496 ----
for (i = 0; i < nptrs; i++) {
switch (sort_type) {
case NUMERIC_LIST:
! if (!is_strict_number(ptrs[i])) {
/* If we get something non-numeric, switch to an
* alphanumeric guess, unless this is the first
* element and we have a dbref.
***************
*** 499,505 ****
p = ptrs[i];
if (*p++ != NUMBER_TOKEN)
return ALPHANUM_LIST;
! else if (is_number(p))
sort_type = DBREF_LIST;
else
return ALPHANUM_LIST;
--- 499,505 ----
p = ptrs[i];
if (*p++ != NUMBER_TOKEN)
return ALPHANUM_LIST;
! else if (is_strict_number(p))
sort_type = DBREF_LIST;
else
return ALPHANUM_LIST;
***************
*** 511,517 ****
break;
#ifdef FLOATING_POINTS
case FLOAT_LIST:
! if (!is_number(ptrs[i]))
return ALPHANUM_LIST;
break;
#endif
--- 511,517 ----
break;
#ifdef FLOATING_POINTS
case FLOAT_LIST:
! if (!is_strict_number(ptrs[i]))
return ALPHANUM_LIST;
break;
#endif
***************
*** 522,528 ****
p = ptrs[i];
if (*p++ != NUMBER_TOKEN)
return ALPHANUM_LIST;
! if (!is_number(p))
return ALPHANUM_LIST;
break;
default:
--- 522,528 ----
p = ptrs[i];
if (*p++ != NUMBER_TOKEN)
return ALPHANUM_LIST;
! if (!is_strict_number(p))
return ALPHANUM_LIST;
break;
default:
Index: src/funstr.c
*** src/funstr.c.orig Sat, 14 Feb 1998 09:54:48 -0600 dunemush (pennmush/f/3_funstr.c 1.2 640) 0.22
--- src/funstr.c Tue, 10 Mar 1998 15:06:50 -0600 dunemush (pennmush/f/3_funstr.c 1.2 640) 0.22(w)
***************
*** 203,209 ****
safe_str("#-1 OUT OF RANGE", buff, bp);
return;
}
! if ((pos + len) < BUFFER_LEN)
args[0][pos + len] = '\0';
if ((Size_t) pos < strlen(args[0]))
safe_str(args[0] + pos, buff, bp);
--- 203,209 ----
safe_str("#-1 OUT OF RANGE", buff, bp);
return;
}
! if (((pos + len) < BUFFER_LEN) && ((pos + len) >= 0))
args[0][pos + len] = '\0';
if ((Size_t) pos < strlen(args[0]))
safe_str(args[0] + pos, buff, bp);
Index: src/look.c
*** src/look.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/12_look.c 1.1 640) 0.22
--- src/look.c Tue, 10 Mar 1998 15:17:50 -0600 dunemush (pennmush/f/12_look.c 1.1 640) 0.22(w)
***************
*** 24,29 ****
--- 24,30 ----
#include "confmagic.h"
extern void decompile_flags _((dbref player, dbref thing, const char *name)); /* from flags.c */
+ extern void decompile_powers _((dbref player, dbref thing, const char *name)); /* from flags.c */
static void look_exits _((dbref player, dbref loc, const char *exit_name));
static void look_contents _((dbref player, dbref loc, const char *contents_name));
***************
*** 1348,1353 ****
--- 1349,1355 ----
decompile_locks(player, thing, object);
decompile_flags(player, thing, object);
+ decompile_powers(player, thing, object);
}
if (dbflag != 3) {
decompile_atrs(player, thing, object, "*", "");
Index: src/parse.c
*** src/parse.c.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/f/22_parse.c 1.2 640) 0.22
--- src/parse.c Tue, 10 Mar 1998 15:12:18 -0600 dunemush (pennmush/f/22_parse.c 1.2 640) 0.22(w)
***************
*** 92,98 ****
return 0;
if (str[0] == '#' && str[1] == '-') /* check like this so error msgs */
return 0; /* are false */
! if (is_number(str))
return parse_number(str) != 0; /* avoid rounding problems */
while (*str == ' ')
str++;
--- 92,98 ----
return 0;
if (str[0] == '#' && str[1] == '-') /* check like this so error msgs */
return 0; /* are false */
! if (is_strict_number(str))
return parse_number(str) != 0; /* avoid rounding problems */
while (*str == ' ')
str++;
***************
*** 154,167 ****
}
int
! is_number(str)
! char const *str;
{
char const *p = str;
NVAL val;
! /* If we're emulating Tiny, anything is a number */
! if (options.tiny_math)
! return 1;
if (!str)
return 0;
while (isspace(*str))
--- 154,165 ----
}
int
! is_strict_number(str)
! char const *str;
{
char const *p = str;
NVAL val;
!
if (!str)
return 0;
while (isspace(*str))
***************
*** 184,189 ****
--- 182,197 ----
if ((val > HUGE_NVAL) || (-val > HUGE_NVAL))
return 0;
return 1;
+ }
+
+ int
+ is_number(str)
+ char const *str;
+ {
+ /* If we're emulating Tiny, anything is a number */
+ if (options.tiny_math)
+ return 1;
+ return is_strict_number(str);
}
/* Table of interesting characters for process_expression() */
Index: src/plyrlist.c
*** src/plyrlist.c.orig Fri, 13 Feb 1998 14:32:30 -0600 dunemush (pennmush/f/24_plyrlist.c 1.1 640) 0.22
--- src/plyrlist.c Tue, 10 Mar 1998 15:13:09 -0600 dunemush (pennmush/f/24_plyrlist.c 1.1 640) 0.22(w)
***************
*** 66,72 ****
if (*name == NUMBER_TOKEN) {
name++;
! if (!is_number(name))
return NOTHING;
p = atoi(name);
if (!GoodObject(p))
--- 66,72 ----
if (*name == NUMBER_TOKEN) {
name++;
! if (!is_strict_number(name))
return NOTHING;
p = atoi(name);
if (!GoodObject(p))
Index: src/wiz.c
*** src/wiz.c.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/f/46_wiz.c 1.5 640) 0.22
--- src/wiz.c Tue, 10 Mar 1998 15:13:15 -0600 dunemush (pennmush/f/46_wiz.c 1.5 640) 0.22(w)
***************
*** 1116,1122 ****
notify(player, "You must specify a value.");
return;
}
! if (!is_number(val)) {
notify(player, "The value must be an integer.");
return;
}
--- 1116,1122 ----
notify(player, "You must specify a value.");
return;
}
! if (!is_strict_number(val)) {
notify(player, "The value must be an integer.");
return;
}
Index: game/txt/hlp/pennflag.hlp
*** game/txt/hlp/pennflag.hlp.orig Fri, 13 Feb 1998 14:34:10 -0600 dunemush (pennmush/h/0_pennflag.h 1.1 640) 0.22
--- game/txt/hlp/pennflag.hlp Mon, 09 Mar 1998 12:44:26 -0600 dunemush (pennmush/h/0_pennflag.h 1.1 640) 0.22(w)
***************
*** 293,299 ****
actions, listen, be triggered, evaluate functions or substitutions,
etc.
! See als: @halt, @restart
& HAVEN
Flag: HAVEN (players, rooms)
--- 293,299 ----
actions, listen, be triggered, evaluate functions or substitutions,
etc.
! See also: @halt, @restart
& HAVEN
Flag: HAVEN (players, rooms)
Index: game/txt/hlp/pennvers.hlp
*** game/txt/hlp/pennvers.hlp.orig Sun, 08 Mar 1998 11:37:13 -0600 dunemush (pennmush/h/5_pennvers.h 1.7 640) 0.22
--- game/txt/hlp/pennvers.hlp Tue, 10 Mar 1998 15:25:10 -0600 dunemush (pennmush/h/5_pennvers.h 1.7 640) 0.22(w)
***************
*** 30,35 ****
--- 30,46 ----
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 7 March 10, 1998
+
+ Fixes:
+ * Typo fixed in pennflag.hlp. Report by Keith Howell.
+ * Bug in mid() that could cause crashes on some OS's when using
+ bad arguments fixed. Report by Yanek@DragonStarMUSH. [TAP]
+ * @wait obj=command fails when tiny_math is defined. Report by Yanek.
+ * With tiny_math defined and tiny_booleans not defined,
+ strings in booleans weren't being treated as 1. Report by Yanek.
+ * @decompile now shows @powers, too. Report by Jonathan Booth.
+
Version 1.7.2 patchlevel 6 March 8, 1998
Fixes: