[PENNMUSH-ANNOUNCE] 1.7.4-patch19
dunemush@pennmush.org
dunemush at pennmush.org
Wed, 26 Jun 2002 10:06:08 -0500
This is patch19 to PennMUSH 1.7.4. After applying this patch, you will
have version 1.7.4p19
To apply this patch, save it to a file in your top-level MUSH directory,
and do the following:
patch -p1 < 1.7.4-patch19
./Configure -d
make update
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.
Then @shutdown and restart your MUSH.
- Alan/Javelin
In this patch:
Minor changes:
* Wizards can now unset the WIZARD flag on any thing, whether they
own it or not. Suggested by Cerekk@bDv.
* Circular zoning is no longer allowed. Fixes part of a bug reported
by Philip Mak. [SW]
Fixes:
* Win32 portability fixes. [EEH]
* grep for 'grep' rather than 'egrep' in restart because in grep 2.5.1,
egrep is a shell script that exec's grep instead of a link.
Fix by Vadiv@M*U*S*H.
* The messages for a possessive get used the object's new location
instead of its old one. Fixed by Apollo@Restoration.
* Attempts by unlinked exits to @link an exit could crash.
* %1 in @areceive was being set to the recipient rather than the giver.
Fixed. Report by jubjup@trekmush.org
* @uptime fix for Linux 2.4 kernel. [SW]
* The @@() function no longer complains about commas. Report by
Trispis@M*U*S*H. [TAP]
* @search flags=<flaglist> is now smarter about toggles with the same
letter and different types. Report by Philip Mak.
* English-style matching now ignores the type of object being matched.
This fixes a bug with, e.g., @link my 1st object=me reported by
Oriens@Alexandria.
* bound() now listed in the math functions list. Report by Dandy@M*U*S*H.
* Help fix for member() by Cerekk@bDV TrekMUSH
* The server can now transparently read mush.cnf (and included) files
that have Dos- or Mac-style line-endings. Suggested by Paleran.
* Crash bug in @search fixed. Reported by Philip Mak.
Prereq: 1.7.4p18
*** 1_7_4.281/Patchlevel Mon, 06 May 2002 16:06:56 -0500 dunemush (pennmush/5_Patchlevel 1.36 600)
--- 1_7_4.301(w)/Patchlevel Fri, 14 Jun 2002 18:26:23 -0500 dunemush (pennmush/5_Patchlevel 1.37 600)
***************
*** 1,2 ****
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p18
--- 1,2 ----
Do not edit this file. It is maintained by the official PennMUSH patches.
! This is PennMUSH 1.7.4p19
*** 1_7_4.281/CHANGES Fri, 10 May 2002 21:58:21 -0500 dunemush (pennmush/8_CHANGES 1.219.1.72.1.51 600)
--- 1_7_4.301(w)/CHANGES Wed, 19 Jun 2002 21:47:07 -0500 dunemush (pennmush/8_CHANGES 1.219.1.72.1.65 600)
***************
*** 18,23 ****
--- 18,54 ----
==========================================================================
+ Version 1.7.4 patchlevel 19 June 14, 2002
+
+ Minor changes:
+ * Wizards can now unset the WIZARD flag on any thing, whether they
+ own it or not. Suggested by Cerekk@bDv.
+ * Circular zoning is no longer allowed. Fixes part of a bug reported
+ by Philip Mak. [SW]
+ Fixes:
+ * Win32 portability fixes. [EEH]
+ * grep for 'grep' rather than 'egrep' in restart because in grep 2.5.1,
+ egrep is a shell script that exec's grep instead of a link.
+ Fix by Vadiv@M*U*S*H.
+ * The messages for a possessive get used the object's new location
+ instead of its old one. Fixed by Apollo@Restoration.
+ * Attempts by unlinked exits to @link an exit could crash.
+ * %1 in @areceive was being set to the recipient rather than the giver.
+ Fixed. Report by jubjup@trekmush.org
+ * @uptime fix for Linux 2.4 kernel. [SW]
+ * The @@() function no longer complains about commas. Report by
+ Trispis@M*U*S*H. [TAP]
+ * @search flags=<flaglist> is now smarter about toggles with the same
+ letter and different types. Report by Philip Mak.
+ * English-style matching now ignores the type of object being matched.
+ This fixes a bug with, e.g., @link my 1st object=me reported by
+ Oriens@Alexandria.
+ * bound() now listed in the math functions list. Report by Dandy@M*U*S*H.
+ * Help fix for member() by Cerekk@bDV TrekMUSH
+ * The server can now transparently read mush.cnf (and included) files
+ that have Dos- or Mac-style line-endings. Suggested by Paleran.
+ * Crash bug in @search fixed. Reported by Philip Mak.
+
Version 1.7.4 patchlevel 18 May 6, 2002
Minor Changes:
*** 1_7_4.281/game/txt/hlp/pennvers.hlp Fri, 10 May 2002 21:58:21 -0500 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.1.1.5.1.4.1.1.1.1.1.1.1.1.1.1 600)
--- 1_7_4.301(w)/game/txt/hlp/pennvers.hlp Wed, 19 Jun 2002 21:47:13 -0500 dunemush (pennmush/12_pennvers.h 1.169.1.42.1.3.1.2.2.2.1.1.1.3.1.1.1.5.1.4.1.1.1.1.1.1.1.1.1.5.1.1.1.1 600)
***************
*** 1,5 ****
& changes
! & 1.7.4p18
This is a list of changes in this patchlevel which are probably of
interest to players. More information about new commands and functions
can probably be gotten via 'help <name of whatever>'. 'help credits'
--- 1,5 ----
& changes
! & 1.7.4p19
This is a list of changes in this patchlevel which are probably of
interest to players. More information about new commands and functions
can probably be gotten via 'help <name of whatever>'. 'help credits'
***************
*** 11,16 ****
--- 11,48 ----
A list of the patchlevels associated with each release can
be read in 'help patchlevels'.
+ Version 1.7.4 patchlevel 19 June 14, 2002
+
+ Minor changes:
+ * Wizards can now unset the WIZARD flag on any thing, whether they
+ own it or not. Suggested by Cerekk@bDv.
+ * Circular zoning is no longer allowed. Fixes part of a bug reported
+ by Philip Mak. [SW]
+ Fixes:
+ * Win32 portability fixes. [EEH]
+ * grep for 'grep' rather than 'egrep' in restart because in grep 2.5.1,
+ egrep is a shell script that exec's grep instead of a link.
+ Fix by Vadiv@M*U*S*H.
+ * The messages for a possessive get used the object's new location
+ instead of its old one. Fixed by Apollo@Restoration.
+ * Attempts by unlinked exits to @link an exit could crash.
+ * %1 in @areceive was being set to the recipient rather than the giver.
+ Fixed. Report by jubjup@trekmush.org
+ * @uptime fix for Linux 2.4 kernel. [SW]
+ * The @@() function no longer complains about commas. Report by
+ Trispis@M*U*S*H. [TAP]
+ * @search flags=<flaglist> is now smarter about toggles with the same
+ letter and different types. Report by Philip Mak.
+ * English-style matching now ignores the type of object being matched.
+ This fixes a bug with, e.g., @link my 1st object=me reported by
+ Oriens@Alexandria.
+ * bound() now listed in the math functions list. Report by Dandy@M*U*S*H.
+ * Help fix for member() by Cerekk@bDV TrekMUSH
+ * The server can now transparently read mush.cnf (and included) files
+ that have Dos- or Mac-style line-endings. Suggested by Paleran.
+ * Crash bug in @search fixed. Reported by Philip Mak.
+
+ & 1.7.4p18
Version 1.7.4 patchlevel 18 May 6, 2002
Minor Changes:
***************
*** 5098,5104 ****
For information on a specific patchlevel of one of the versions listed,
type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3'
! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35
--- 5130,5136 ----
For information on a specific patchlevel of one of the versions listed,
type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3'
! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35
*** 1_7_4.281/game/txt/hlp/pennfunc.hlp Fri, 10 May 2002 21:58:21 -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 600)
--- 1_7_4.301(w)/game/txt/hlp/pennfunc.hlp Fri, 14 Jun 2002 18:23:14 -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 600)
***************
*** 153,161 ****
Math functions take one or more numbers and return a numeric value.
What is allowed as a 'number' depends on @config settings (see help).
These functions can taken both integers and floating point numbers:
! add() lmath() max() mean() median()
! min() mul() sign() stddev() sub()
! trunc() val()
These functions operate only on integers (if passed floating point
numbers, an error will be reported):
--- 153,161 ----
Math functions take one or more numbers and return a numeric value.
What is allowed as a 'number' depends on @config settings (see help).
These functions can taken both integers and floating point numbers:
! add() bound() lmath() max() mean()
! median() min() mul() sign() stddev()
! sub() trunc() val()
These functions operate only on integers (if passed floating point
numbers, an error will be reported):
***************
*** 1921,1930 ****
& MEMBER()
member(<list>,<word>[,<delimiter>])
! Member takes a list and a word, and returns the position of <word>
if <word> is a word in <list>. A word is defined as a string which
has no interior spaces. So ' hello ' would be one word, while
'hello there' would be two. See LISTS
& MERGE()
merge(<string1>, <string2>, <character>)
--- 1921,1932 ----
& MEMBER()
member(<list>,<word>[,<delimiter>])
! Takes a list and a word, and returns the position of <word>
if <word> is a word in <list>. A word is defined as a string which
has no interior spaces. So ' hello ' would be one word, while
'hello there' would be two. See LISTS
+
+ member() is case-sensitive.
& MERGE()
merge(<string1>, <string2>, <character>)
*** 1_7_4.281/game/restart Mon, 16 Jul 2001 11:57:35 -0500 dunemush (pennmush/39_restart 1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.1 700)
--- 1_7_4.301(w)/game/restart Fri, 17 May 2002 14:48:13 -0500 dunemush (pennmush/39_restart 1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.2 700)
***************
*** 55,61 ****
# Prevent double-starting things. You may need to provide a pathname for
# some of the commands. System V flavors need "ps -f" instead of "ps uwx".
! mush=`ps uwx | egrep $CONF_FILE | grep -v egrep | wc -l`
if [ $mush -gt 0 ]; then
--- 55,61 ----
# Prevent double-starting things. You may need to provide a pathname for
# some of the commands. System V flavors need "ps -f" instead of "ps uwx".
! mush=`ps uwx | grep $CONF_FILE | grep -v grep | wc -l`
if [ $mush -gt 0 ]; then
*** 1_7_4.281/src/wiz.c Fri, 03 May 2002 22:41:29 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1 660)
--- 1_7_4.301(w)/src/wiz.c Thu, 20 Jun 2002 23:24:41 -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.2 660)
***************
*** 1336,1342 ****
enum search_class sclass = S_OWNER;
int n;
int restrict_type = NOTYPE;
! object_flag_type restrict_flags = 0, restrict_toggles = 0;
dbref restrict_obj = NOTHING, restrict_owner = ANY_OWNER;
int is_wiz;
dbref low = 0, high = db_top;
--- 1336,1342 ----
enum search_class sclass = S_OWNER;
int n;
int restrict_type = NOTYPE;
! object_flag_type restrict_flags = 0;
dbref restrict_obj = NOTHING, restrict_owner = ANY_OWNER;
int is_wiz;
dbref low = 0, high = db_top;
***************
*** 1454,1468 ****
return -1;
}
} else if (string_prefix("flags", class)) {
! /*
! * convert_flags ignores previous values of flag_mask and
! * restrict_type while setting them
! */
sclass = S_FLAG;
! if (restrict && *restrict &&
! !convert_flags(player, (char *) restrict, &restrict_flags,
! &restrict_toggles, &restrict_type))
return -1;
} else {
notify(player, T("Unknown search class."));
return -1;
--- 1454,1465 ----
return -1;
}
} else if (string_prefix("flags", class)) {
! /* Handle the checking later. */
sclass = S_FLAG;
! if (!restrict || !*restrict) {
! notify(player, T("You must give a flag list."));
return -1;
+ }
} else {
notify(player, T("Unknown search class."));
return -1;
***************
*** 1568,1573 ****
--- 1565,1573 ----
char tbuf1[BUFFER_LEN];
char *bp;
+ if (!restrict || !*restrict)
+ break;
+
for (n = low; n < high; n++) {
if (!((restrict_owner == ANY_OWNER || Owner(n) == restrict_owner)
&& (restrict_type == NOTYPE || Typeof(n) == restrict_type)))
***************
*** 1620,1627 ****
for (n = low; n < high; n++) {
if ((restrict_owner == ANY_OWNER || Owner(n) == restrict_owner)
&& (restrict_type == NOTYPE || Typeof(n) == restrict_type)
! && (Flags(n) & restrict_flags) == restrict_flags
! && (Toggles(n) & restrict_toggles) == restrict_toggles) {
if (nresults >= result_size) {
dbref *newresults;
result_size *= 2;
--- 1620,1626 ----
for (n = low; n < high; n++) {
if ((restrict_owner == ANY_OWNER || Owner(n) == restrict_owner)
&& (restrict_type == NOTYPE || Typeof(n) == restrict_type)
! && flaglist_check(player, n, restrict, 1)) {
if (nresults >= result_size) {
dbref *newresults;
result_size *= 2;
*** 1_7_4.281/src/utils.c Sun, 28 Apr 2002 16:04:23 -0500 dunemush (pennmush/b/27_utils.c 1.30.1.1 660)
--- 1_7_4.301(w)/src/utils.c Thu, 20 Jun 2002 23:24:41 -0500 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.1 660)
***************
*** 16,21 ****
--- 16,29 ----
#else
#include <strings.h>
#endif
+ #ifdef I_UNISTD
+ #include <unistd.h>
+ #endif
+ #ifdef WIN32
+ #include <wtypes.h>
+ #include <winbase.h>
+ #undef OPAQUE
+ #endif
#include <ctype.h>
#include <fcntl.h>
*** 1_7_4.281/src/set.c Wed, 10 Apr 2002 20:35:58 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.1 660)
--- 1_7_4.301(w)/src/set.c Thu, 20 Jun 2002 23:24:41 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.1.1.1.1.1 660)
***************
*** 383,388 ****
--- 383,402 ----
notify(player, T("You shouldn't zone objects to themselves!"));
return;
}
+ /* Don't allow circular zones */
+ {
+ dbref tmp;
+ for (tmp = Zone(zone); GoodObject(tmp); tmp = Zone(tmp)) {
+ if (tmp == thing) {
+ notify(player, T("You can't make circular zones!"));
+ return;
+ }
+ if (tmp == Zone(tmp)) /* Ran into an object zoned to itself */
+ break;
+ }
+ }
+
+
/* Don't allow chzone to objects without elocks!
* If no lock is set, set a default lock and warn.
* This checks for many trivial elocks (canuse/1, where &canuse=1)
*** 1_7_4.281/src/rob.c Mon, 11 Mar 2002 17:59:05 -0600 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3 660)
--- 1_7_4.301(w)/src/rob.c Thu, 20 Jun 2002 23:24:40 -0500 dunemush (pennmush/b/42_rob.c 1.18.1.2.1.3.1.3.1.1 660)
***************
*** 209,214 ****
--- 209,215 ----
safe_format(tbuf1, &bp, T("%s gave you %s."), Name(player),
Name(thing));
*bp = '\0';
+ sprintf(myenv[1], "#%d", player);
real_did_it(who, who, "RECEIVE", tbuf1, "ORECEIVE", NULL,
"ARECEIVE", NOTHING, myenv);
*** 1_7_4.281/src/plyrlist.c Sat, 23 Jun 2001 12:54:11 -0500 dunemush (pennmush/b/46_plyrlist.c 1.5.1.1 660)
--- 1_7_4.301(w)/src/plyrlist.c Thu, 20 Jun 2002 23:24:40 -0500 dunemush (pennmush/b/46_plyrlist.c 1.5.1.1.1.1 660)
***************
*** 61,66 ****
--- 61,68 ----
int p;
void *hval;
+ if (!name || !*name)
+ return NOTHING;
if (*name == NUMBER_TOKEN) {
name++;
if (!is_strict_number(name))
*** 1_7_4.281/src/move.c Fri, 10 May 2002 21:58:21 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1 660)
--- 1_7_4.301(w)/src/move.c Thu, 20 Jun 2002 23:24:40 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1.1.1 660)
***************
*** 521,527 ****
(controls(player, thing) ||
(EnterOk(Location(thing)) &&
eval_lock(player, Location(thing), Enter_Lock)))) {
- moveto(thing, player);
notify(Location(thing),
tprintf(T("%s was taken from you."), Name(thing)));
notify_format(thing, T("%s took you."), Name(player));
--- 521,526 ----
***************
*** 529,534 ****
--- 528,534 ----
Name(Location(thing)));
sprintf(tbuf2, T("takes %s from %s."), Name(thing),
Name(Location(thing)));
+ moveto(thing, player);
did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS",
NOTHING);
myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref");
*** 1_7_4.281/src/match.c Sat, 18 Aug 2001 10:55:46 -0500 dunemush (pennmush/c/2_match.c 1.24 660)
--- 1_7_4.301(w)/src/match.c Thu, 20 Jun 2002 23:24:40 -0500 dunemush (pennmush/c/2_match.c 1.24.1.1.1.1 660)
***************
*** 94,100 ****
const int type, const long int flags,
dbref *last_match, int *match_count));
static dbref match_english _((const dbref who, const char *name,
! const int type, const long int flags));
static dbref choose_thing _((const dbref match_who, const int preferred_type,
long int flags, dbref thing1, dbref thing2,
int *match_count));
--- 94,100 ----
const int type, const long int flags,
dbref *last_match, int *match_count));
static dbref match_english _((const dbref who, const char *name,
! const long int flags));
static dbref choose_thing _((const dbref match_who, const int preferred_type,
long int flags, dbref thing1, dbref thing2,
int *match_count));
***************
*** 256,262 ****
}
if ((flags & MAT_ENGLISH) && !GoodObject(last_match)
&& !GoodObject(exact_match)) {
! match = match_english(who, name, type, flags);
if (GoodObject(match)) {
exact_match_count++;
exact_match = match;
--- 256,262 ----
}
if ((flags & MAT_ENGLISH) && !GoodObject(last_match)
&& !GoodObject(exact_match)) {
! match = match_english(who, name, flags);
if (GoodObject(match)) {
exact_match_count++;
exact_match = match;
***************
*** 529,538 ****
}
static dbref
! match_english(who, name, type, flags)
const dbref who;
const char *name;
- const int type;
const long int flags;
{
int do_loc;
--- 529,537 ----
}
static dbref
! match_english(who, name, flags)
const dbref who;
const char *name;
const long int flags;
{
int do_loc;
***************
*** 623,631 ****
}
matchnum = 0;
DOLIST(item, item) {
! if ((Typeof(item) & type)
! && (!strcasecmp(Name(item), dupname)
! || string_match(Name(item), dupname))) {
matchnum++;
if (matchnum == num) {
mush_free(p, "string");
--- 622,629 ----
}
matchnum = 0;
DOLIST(item, item) {
! if (!strcasecmp(Name(item), dupname)
! || string_match(Name(item), dupname)) {
matchnum++;
if (matchnum == num) {
mush_free(p, "string");
*** 1_7_4.281/src/game.c Mon, 06 May 2002 16:03:56 -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 660)
--- 1_7_4.301(w)/src/game.c Thu, 20 Jun 2002 23:24:39 -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.1 660)
***************
*** 143,149 ****
--- 143,151 ----
dbref orator = NOTHING;
+ #ifndef WIN32
static Pid_t forked_dump_pid = -1;
+ #endif
/*
* used to allocate storage for temporary stuff, cleared before command
***************
*** 1667,1754 ****
if (!fp)
return;
! /* First lines are name, state, pid, ppid and some other stuff. We don't care about them */
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
! fgets(line, sizeof line, fp);
!
! /* 7th line isn't Groups: on linux 2.0.X */
! if (strncmp(line, "Groups:", 7) == 0)
! fgets(line, sizeof line, fp);
!
! /* Memory stats */
!
! /* VmSize */
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmLck */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmRSS */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmData */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmStk */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmExe */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* VmLib */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* Signals */
! /* SigPnd */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* SigBlk */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* SigIgn */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
!
! /* SigCgt */
! fgets(line, sizeof line, fp);
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
- /* We don't care about capabilities */
fclose(fp);
#else /* LINUX */
--- 1669,1692 ----
if (!fp)
return;
! /* Skip lines we don't care about. */
! while (fgets(line, sizeof line, fp) != NULL) {
! static const char *fields[] = {
! "VmSize:", "VmRSS:", "VmData:", "VmStk:", "VmExe:", "VmLib:",
! "SigPnd:", "SigBlk:", "SigIgn:", "SigCgt:", NULL
! };
! int n;
!
! for (n = 0; fields[n]; n++) {
! Size_t len = strlen(fields[n]);
! if (strncmp(line, fields[n], len) == 0) {
! if ((nl = strchr(line, '\n')) != NULL)
! *nl = '\0';
! notify(player, line);
! }
! }
! }
fclose(fp);
#else /* LINUX */
*** 1_7_4.281/src/fundb.c Tue, 25 Sep 2001 16:27:49 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1 660)
--- 1_7_4.301(w)/src/fundb.c Thu, 20 Jun 2002 23:24:38 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1 660)
***************
*** 866,878 ****
/* ARGSUSED */
FUNCTION(fun_orflags)
{
! safe_boolean(handle_flaglists(executor, args[0], args[1], 0), buff, bp);
}
/* ARGSUSED */
FUNCTION(fun_andflags)
{
! safe_boolean(handle_flaglists(executor, args[0], args[1], 1), buff, bp);
}
static lock_type
--- 866,880 ----
/* ARGSUSED */
FUNCTION(fun_orflags)
{
! dbref it = match_thing(executor, args[0]);
! safe_boolean(flaglist_check(executor, it, args[1], 0), buff, bp);
}
/* ARGSUSED */
FUNCTION(fun_andflags)
{
! dbref it = match_thing(executor, args[0]);
! safe_boolean(flaglist_check(executor, it, args[1], 1), buff, bp);
}
static lock_type
*** 1_7_4.281/src/function.c Fri, 10 May 2002 21:58:21 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1 660)
--- 1_7_4.301(w)/src/function.c Thu, 20 Jun 2002 23:24:38 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.1 660)
***************
*** 153,159 ****
typedef struct fun_tab FUNTAB;
FUNTAB flist[] = {
! {"@@", fun_atat, 1, 1, FN_NOPARSE},
{"ABS", fun_abs, 1, 1, FN_REG},
{"ADD", fun_add, 2, INT_MAX, FN_REG},
{"AFTER", fun_after, 2, 2, FN_REG},
--- 153,159 ----
typedef struct fun_tab FUNTAB;
FUNTAB flist[] = {
! {"@@", fun_atat, 1, -1, FN_NOPARSE},
{"ABS", fun_abs, 1, 1, FN_REG},
{"ADD", fun_add, 2, INT_MAX, FN_REG},
{"AFTER", fun_after, 2, 2, FN_REG},
*** 1_7_4.281/src/flags.c Sat, 16 Mar 2002 09:29:58 -0600 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 660)
--- 1_7_4.301(w)/src/flags.c Thu, 20 Jun 2002 23:24:38 -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.1 660)
***************
*** 623,631 ****
*/
if (flagp->type == NOTYPE) {
! /* A wiz can set things he owns WIZ, but can't reset his own bit. */
! if (flagp->flag == WIZARD)
return (Wizard(player) && Owns(player, thing) && !IsPlayer(thing));
/* Wizards can set or unset anything royalty. Royalty can set anything
* they own royalty, but cannot reset their own bits. */
#ifdef ROYALTY_FLAG
--- 623,634 ----
*/
if (flagp->type == NOTYPE) {
! /* A wiz can set things he owns WIZ, but nothing else. */
! if ((flagp->flag == WIZARD) && !negate)
return (Wizard(player) && Owns(player, thing) && !IsPlayer(thing));
+ /* A wiz can unset the WIZ bit on any non-player */
+ if ((flagp->flag == WIZARD) && negate)
+ return (Wizard(player) && !IsPlayer(thing));
/* Wizards can set or unset anything royalty. Royalty can set anything
* they own royalty, but cannot reset their own bits. */
#ifdef ROYALTY_FLAG
***************
*** 1161,1183 ****
}
}
int
! handle_flaglists(player, name, fstr, type)
dbref player;
! char *name;
! char *fstr;
! int type;
! /* 0 for orflags, 1 for andflags */
{
char *s;
FLAG *fp;
int toggle, negate, temp;
int ret = type;
! dbref it = match_thing(player, name);
toggle = negate = temp = 0;
if (it == NOTHING)
return 0;
! for (s = fstr; *s; s++) {
/* Check for a negation sign. If we find it, we note it and
* increment the pointer to the next character.
--- 1164,1186 ----
}
}
+
int
! flaglist_check(player, it, fstr, type)
dbref player;
! dbref it;
! const char *fstr;
! int type; /* 0 for orflags, 1 for andflags */
{
char *s;
FLAG *fp;
int toggle, negate, temp;
int ret = type;
!
toggle = negate = temp = 0;
if (it == NOTHING)
return 0;
! for (s = (char *) fstr; *s; s++) {
/* Check for a negation sign. If we find it, we note it and
* increment the pointer to the next character.
***************
*** 1198,1212 ****
/* Find the flag. */
if ((fp = letter_to_flagptr(*s, Typeof(it), &toggle)) == NULL) {
! /* Either we got a '!' that wasn't followed by a letter, or
! * we couldn't find that flag. For AND, since we've failed
! * a check, we can return false. Otherwise we just go on.
*/
! if (type == 1)
! return 0;
! else
! continue;
} else {
/* does the object have this flag? */
--- 1201,1230 ----
/* Find the flag. */
if ((fp = letter_to_flagptr(*s, Typeof(it), &toggle)) == NULL) {
! /* Maybe *s is a type specifier (P, T, E, R). These aren't really
! * flags, but we grandfather them in to preserve old code
*/
! if ((*s == 'T') || (*s == 'R') || (*s == 'E') || (*s == 'P')) {
! temp = (*s == 'T') ? (Typeof(it) == TYPE_THING) :
! ((*s == 'R') ? (Typeof(it) == TYPE_ROOM) :
! ((*s == 'E') ? (Typeof(it) == TYPE_EXIT) :
! (Typeof(it) == TYPE_PLAYER)));
! if ((type == 1) && ((negate && temp) || (!negate && !temp)))
! return 0;
! else if ((type == 0) && ((!negate && temp) || (negate && !temp)))
! ret |= 1;
! } else {
! /* Either we got a '!' that wasn't followed by a letter, or
! * we couldn't find that flag. For AND, since we've failed
! * a check, we can return false. Otherwise we just go on.
! */
!
! if (type == 1)
! return 0;
! else
! continue;
! }
} else {
/* does the object have this flag? */
*** 1_7_4.281/src/destroy.c Mon, 25 Feb 2002 16:04:41 -0600 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1 660)
--- 1_7_4.301(w)/src/destroy.c Thu, 20 Jun 2002 23:24:38 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1.1.1.1.1 660)
***************
*** 1152,1158 ****
static void
check_zones()
{
! dbref n, zone;
for (n = 0; n < db_top; n++) {
if (IsGarbage(n))
--- 1152,1158 ----
static void
check_zones()
{
! dbref n, zone, tmp;
for (n = 0; n < db_top; n++) {
if (IsGarbage(n))
***************
*** 1160,1165 ****
--- 1160,1177 ----
zone = Zone(n);
if (!GoodObject(zone))
continue;
+ if (zone != n) /* Objects can be zoned to themselves */
+ for (tmp = Zone(zone); GoodObject(tmp); tmp = Zone(tmp)) {
+ if (tmp == n) {
+ notify_format(Owner(n),
+ T("You own an object in a circular zone chain: %s"),
+ object_header(Owner(n), n));
+ break;
+ }
+ if (tmp == Zone(tmp)) /* Object zoned to itself */
+ break;
+ }
+
if (Marked(zone))
continue;
if (getlock(zone, Zone_Lock) == TRUE_BOOLEXP)
*** 1_7_4.281/src/csrimalloc.c Tue, 15 May 2001 15:59:50 -0500 dunemush (pennmush/c/26_csrimalloc 1.23 660)
--- 1_7_4.301(w)/src/csrimalloc.c Thu, 20 Jun 2002 23:24:37 -0500 dunemush (pennmush/c/26_csrimalloc 1.23.1.1 660)
***************
*** 5,10 ****
--- 5,15 ----
#ifdef I_STDDEF
#include <stddef.h>
#endif
+ #ifdef I_STRING
+ #include <string.h>
+ #else
+ #include <strings.h>
+ #endif
#ifdef I_FCNTL
#include <fcntl.h>
#endif
***************
*** 1320,1326 ****
return 0;
}
if (tag == FREE) {
! int i, n;
char *cp;
(void) sprintf(buf, " next=0x%lx, prev=0x%lx\n",
--- 1325,1334 ----
return 0;
}
if (tag == FREE) {
! #ifdef CSRI_DEBUG
! int i;
! #endif
! int n;
char *cp;
(void) sprintf(buf, " next=0x%lx, prev=0x%lx\n",
***************
*** 1758,1765 ****
global_nbytes = 0;
__spscan(__m_count, (SPBLK *) NULL, sp);
(void) sprintf(_malloc_statsbuf,
! "%% %lu bytes %lu mallocs %lu vm\n",
! global_nbytes, nmallocs, (ulong) sbrk(0));
(void) fputs(_malloc_statsbuf, fp);
(void) fflush(fp);
}
--- 1766,1773 ----
global_nbytes = 0;
__spscan(__m_count, (SPBLK *) NULL, sp);
(void) sprintf(_malloc_statsbuf,
! "%% %lu bytes %lu mallocs %p vm\n",
! global_nbytes, nmallocs, sbrk(0));
(void) fputs(_malloc_statsbuf, fp);
(void) fflush(fp);
}
***************
*** 2502,2518 ****
* Level 3 makes mal_verify() check that all free blocks contain a
* magic pattern that is put into a free block when it is freed.
*/
void
mal_debug(level)
int level;
{
- #ifdef CSRI_DEBUG
if (level < 0 || level > 3) {
return;
}
_malloc_debugging = level;
- #endif /* CSRI_DEBUG */
}
/*
* Allows you to control the number of system calls made, which might
--- 2510,2526 ----
* Level 3 makes mal_verify() check that all free blocks contain a
* magic pattern that is put into a free block when it is freed.
*/
+ #ifdef CSRI_DEBUG
void
mal_debug(level)
int level;
{
if (level < 0 || level > 3) {
return;
}
_malloc_debugging = level;
}
+ #endif /* CSRI_DEBUG */
/*
* Allows you to control the number of system calls made, which might
***************
*** 2592,2602 ****
/*
* Dumps the distribution of allocated sizes we've gathered so far
*/
void
mal_statsdump(fp)
FILE *fp;
{
- #ifdef CSRI_PROFILESIZES
int i;
char buf[128];
--- 2600,2610 ----
/*
* Dumps the distribution of allocated sizes we've gathered so far
*/
+ #ifdef CSRI_PROFILESIZES
void
mal_statsdump(fp)
FILE *fp;
{
int i;
char buf[128];
***************
*** 2616,2623 ****
_malloc_scount[0] = 0;
}
(void) fflush(fp);
- #endif /* CSRI_PROFILESIZES */
}
/* Author: Mark Moraes <moraes@csri.toronto.edu> */
--- 2624,2631 ----
_malloc_scount[0] = 0;
}
(void) fflush(fp);
}
+ #endif /* CSRI_PROFILESIZES */
/* Author: Mark Moraes <moraes@csri.toronto.edu> */
***************
*** 2659,2669 ****
* into them when they were freed to make sure the program is not still
* trying to access those blocks.
*/
int
mal_verify(fullcheck)
int fullcheck;
{
- #ifdef CSRI_DEBUG
REGISTER Word *ptr, *p, *blk, *blkend;
int i;
--- 2667,2677 ----
* into them when they were freed to make sure the program is not still
* trying to access those blocks.
*/
+ #ifdef CSRI_DEBUG
int
mal_verify(fullcheck)
int fullcheck;
{
REGISTER Word *ptr, *p, *blk, *blkend;
int i;
***************
*** 2710,2718 ****
}
}
}
- #endif /* CSRI_DEBUG */
return (0);
}
/*
* This file contains a few splay tree routines snarfed from David
--- 2718,2726 ----
}
}
}
return (0);
}
+ #endif /* CSRI_DEBUG */
/*
* This file contains a few splay tree routines snarfed from David
*** 1_7_4.281/src/create.c Mon, 25 Mar 2002 11:18:21 -0600 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.2.1.1 660)
--- 1_7_4.301(w)/src/create.c Thu, 20 Jun 2002 23:24:37 -0500 dunemush (pennmush/c/27_create.c 1.27.1.3.1.1.1.1.1.1.1.2.1.1.1.1.1.1 660)
***************
*** 238,244 ****
do_unlink(player, name);
return;
}
! if (!IsRoom(player) && IsExit(Location(player))) {
notify(player, T("You somehow wound up in a exit. No biscuit."));
return;
}
--- 238,245 ----
do_unlink(player, name);
return;
}
! if (!IsRoom(player) && GoodObject(Location(player)) &&
! IsExit(Location(player))) {
notify(player, T("You somehow wound up in a exit. No biscuit."));
return;
}
*** 1_7_4.281/src/conf.c Tue, 05 Mar 2002 09:13:15 -0600 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2 660)
--- 1_7_4.301(w)/src/conf.c Thu, 20 Jun 2002 23:24:37 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.2 660)
***************
*** 801,813 ****
fgets(tbuf1, BUFFER_LEN, fp);
continue;
}
! /* this is a real line. Strip the newline and characters following it.
* Split the line into command and argument portions. If it exists,
! * also strip off the trailing comment.
*/
for (p = tbuf1; *p && (*p != '\n'); p++) ;
! *p = '\0'; /* strip '\n' */
for (p = tbuf1; *p && isspace(*p); p++) /* strip spaces */
;
for (q = p; *q && !isspace(*q); q++) /* move over command */
--- 801,817 ----
fgets(tbuf1, BUFFER_LEN, fp);
continue;
}
! /* this is a real line. Strip the end-of-line and characters following it.
* Split the line into command and argument portions. If it exists,
! * also strip off the trailing comment. We try to make this work
! * whether the eol is \n (unix, yay), \r\n (dos/win, ew), or \r (mac, hmm)
*/
for (p = tbuf1; *p && (*p != '\n'); p++) ;
! /* If we have \r before us, back up one so we strip it as well */
! if ((p != tbuf1) && (*(p - 1) == '\r'))
! p--;
! *p = '\0'; /* strip the end of line char(s) */
for (p = tbuf1; *p && isspace(*p); p++) /* strip spaces */
;
for (q = p; *q && !isspace(*q); q++) /* move over command */
*** 1_7_4.281/hdrs/version.h Mon, 06 May 2002 16:06:56 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.1.1.7 660)
--- 1_7_4.301(w)/hdrs/version.h Thu, 20 Jun 2002 23:24:42 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.1.1.8 660)
***************
*** 1,2 ****
! #define VERSION "PennMUSH version 1.7.4 patchlevel 18 [05/06/2002]"
! #define SHORTVN "PennMUSH 1.7.4p18"
--- 1,2 ----
! #define VERSION "PennMUSH version 1.7.4 patchlevel 19 [06/14/2002]"
! #define SHORTVN "PennMUSH 1.7.4p19"
*** 1_7_4.281/hdrs/flags.h Wed, 13 Sep 2000 15:29:45 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3 660)
--- 1_7_4.301(w)/hdrs/flags.h Thu, 20 Jun 2002 23:24:41 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.1 660)
***************
*** 13,19 ****
extern object_flag_type find_flag
_((char *name, int type, int *toggle, int is_conf));
extern int sees_flag _((dbref privs, dbref thing, char *name));
! extern int handle_flaglists _((dbref player, char *name, char *fstr, int type));
extern void set_flag
_((dbref player, dbref thing, char *flag, int negate, int hear, int listener));
extern const char *power_description _((dbref thing));
--- 13,20 ----
extern object_flag_type find_flag
_((char *name, int type, int *toggle, int is_conf));
extern int sees_flag _((dbref privs, dbref thing, char *name));
! extern int flaglist_check
! _((dbref player, dbref it, const char *fstr, int type));
extern void set_flag
_((dbref player, dbref thing, char *flag, int negate, int hear, int listener));
extern const char *power_description _((dbref thing));
*** 1_7_4.281/Configure Sun, 28 Apr 2002 16:04:23 -0500 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1 710)
--- 1_7_4.301(w)/Configure Mon, 10 Jun 2002 23:41:07 -0500 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.1 710)
***************
*** 2713,2719 ****
EOH
case "$gccversion" in
2*)
! pennmushgccflags="-W -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wformat -Wparentheses -Wuninitialized"
case "$dflt" in
'none') dflt="$pennmushgccflags" ;;
*-W*) ;;
--- 2713,2719 ----
EOH
case "$gccversion" in
2*)
! pennmushgccflags="-Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith"
case "$dflt" in
'none') dflt="$pennmushgccflags" ;;
*-W*) ;;
***************
*** 2721,2727 ****
esac
;;
egcs*)
! pennmushgccflags="-W -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wformat -Wparentheses -Wuninitialized"
case "$dflt" in
'none') dflt="$pennmushgccflags" ;;
*-W*) ;;
--- 2721,2727 ----
esac
;;
egcs*)
! pennmushgccflags="-Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith"
case "$dflt" in
'none') dflt="$pennmushgccflags" ;;
*-W*) ;;
*** 1_7_4.281/po/Makefile Fri, 15 Feb 2002 16:08:20 -0600 dunemush (pennmush/e/47_Makefile 1.8 660)
--- 1_7_4.301(w)/po/Makefile Fri, 14 Jun 2002 20:49:12 -0500 dunemush (pennmush/e/47_Makefile 1.9 660)
***************
*** 1,10 ****
.SUFFIXES: .po .pox .mo
POFILES=ru_RU.po nl_NL.po sv_SE.po hu_HU.po es_ES.po pt_BR.po fr_FR.po \
! da_DK.po de_DE.po no_NO.po
.pox.po: $*.pox pennmush.pot
! -msgmerge $*.pox pennmush.pot > $*.po
po-files: $(POFILES)
--- 1,10 ----
.SUFFIXES: .po .pox .mo
POFILES=ru_RU.po nl_NL.po sv_SE.po hu_HU.po es_ES.po pt_BR.po fr_FR.po \
! da_DK.po de_DE.po no_NO.po
.pox.po: $*.pox pennmush.pot
! -msgmerge -v $*.pox pennmush.pot > $*.po
po-files: $(POFILES)