This is patch01 to PennMUSH 1.7.5. After applying this patch, you will have version 1.7.5p1 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.7.5-patch01 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: * PCRE updated to 3.7. [SW] * player_name_len is now runtime configurable. Suggested by Linda Antonsson. [SW] * Any object of any type may be a ZMO, and any object of any type may be zoned to a ZMO of any type. However, searching for $commands has not changed, so $commands on a ZMO are only searched when the ZMO is not a room, and $commands on objects within the ZMO are only searched when the ZMO is a room. [TAP] * @chzoneall nows directly calls @chzone, and @chzone now tells you when it's not changing a zone. [TAP] * The term "Zone Master" (player) has been replaced by "Shared Player" in the help. [TAP] * Many obsolete db formats are no longer readable. hdrs/oldattrib.h and src/convdb.c are no more. [SW] * Code cleanup. [SW] Fixes: * Help file for mix updated. Report by Cmintrnt@M*U*S*H * Updated win32 config.h file and other fixes by Noltar@Korongil * WHO wasn't showing unconnected players. Report by Noltar@Korongil. [SW] * Help fixes. [SW] Prereq: 1.7.5p0 (cd utils; sh mkcmds.sh) Rebuilding command switch file Rebuilding command prototype file Rebuilding function prototype file *** 1_7_5.37/Patchlevel Sat, 10 Feb 2001 09:14:53 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.1 600) --- 1_7_5.44(w)/Patchlevel Mon, 03 Dec 2001 10:13:38 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.1 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.5p0 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.5p1 *** 1_7_5.37/CHANGES.174 Tue, 13 Nov 2001 17:29:19 -0600 dunemush (pennmush/8_CHANGES 1.219.1.56 600) --- 1_7_5.44(w)/CHANGES.174 Mon, 03 Dec 2001 10:13:18 -0600 dunemush (pennmush/8_CHANGES 1.219.1.58 600) *************** *** 17,22 **** --- 17,33 ---- ========================================================================== + Version 1.7.4 patchlevel 13 November 30, 2001 + + Minor changes: + * options.h.dist mentions Darwin as well as MacOS X. [DW] + * PCRE updated to 3.7. [SW] + * When CHAN_NAME_LEN is increased beyond 30, the @chan/list header + line is misaligned, and other strange things can happen to + @chan/list. Reported by Bladed Thoth + Fixes: + * Crash bug in chat channels reported by BladedThoth. + Version 1.7.4 patchlevel 12 November 9, 2001 Minor changes: *** 1_7_5.37/CHANGES Wed, 14 Nov 2001 14:49:26 -0600 dunemush (pennmush/g/7_CHANGES 1.8 600) --- 1_7_5.44(w)/CHANGES Mon, 03 Dec 2001 10:13:59 -0600 dunemush (pennmush/g/7_CHANGES 1.11 600) *************** *** 17,22 **** --- 17,46 ---- ========================================================================== + Version 1.7.5 patchlevel 1 December 3, 2001 + + Minor Changes: + * PCRE updated to 3.7. [SW] + * player_name_len is now runtime configurable. Suggested by + Linda Antonsson. [SW] + * Any object of any type may be a ZMO, and any object of any type + may be zoned to a ZMO of any type. However, searching for + $commands has not changed, so $commands on a ZMO are only + searched when the ZMO is not a room, and $commands on objects + within the ZMO are only searched when the ZMO is a room. [TAP] + * @chzoneall nows directly calls @chzone, and @chzone now tells + you when it's not changing a zone. [TAP] + * The term "Zone Master" (player) has been replaced by "Shared + Player" in the help. [TAP] + * Many obsolete db formats are no longer readable. hdrs/oldattrib.h + and src/convdb.c are no more. [SW] + * Code cleanup. [SW] + Fixes: + * Help file for mix updated. Report by Cmintrnt@M*U*S*H + * Updated win32 config.h file and other fixes by Noltar@Korongil + * WHO wasn't showing unconnected players. Report by Noltar@Korongil. [SW] + * Help fixes. [SW] + Version 1.7.5 patchlevel 0 November 14, 2001 Major Changes: *************** *** 40,46 **** Functions: * mix() can take more than 10 lists and of unequal length. [3,SW] * iname() returns the name of an object from inside (honoring nameformat) ! Idea by Jeff Heinin. * lplayers() returns a list of players in the location. Handy for room parents. By Vexon@M*U*S*H. * lvplayers(), lvcon(), lvexits() are like lplayers/lcon/lexits, but --- 64,70 ---- Functions: * mix() can take more than 10 lists and of unequal length. [3,SW] * iname() returns the name of an object from inside (honoring nameformat) ! Idea by Jeffrey@TheHotel. * lplayers() returns a list of players in the location. Handy for room parents. By Vexon@M*U*S*H. * lvplayers(), lvcon(), lvexits() are like lplayers/lcon/lexits, but *** 1_7_5.37/game/txt/hlp/pennvers.hlp Wed, 14 Nov 2001 14:49:26 -0600 dunemush (pennmush/12_pennvers.h 1.169.1.45 600) --- 1_7_5.44(w)/game/txt/hlp/pennvers.hlp Mon, 03 Dec 2001 10:14:02 -0600 dunemush (pennmush/12_pennvers.h 1.169.1.46 600) *************** *** 1,5 **** & changes ! & 1.7.5p0 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 '. 'help credits' --- 1,5 ---- & changes ! & 1.7.5p1 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 '. 'help credits' *************** *** 11,16 **** --- 11,41 ---- A list of the patchlevels associated with each release can be read in 'help patchlevels'. + Version 1.7.5 patchlevel 1 December 3, 2001 + + Minor Changes: + * PCRE updated to 3.7. [SW] + * player_name_len is now runtime configurable. Suggested by + Linda Antonsson. [SW] + * Any object of any type may be a ZMO, and any object of any type + may be zoned to a ZMO of any type. However, searching for + $commands has not changed, so $commands on a ZMO are only + searched when the ZMO is not a room, and $commands on objects + within the ZMO are only searched when the ZMO is a room. [TAP] + * @chzoneall nows directly calls @chzone, and @chzone now tells + you when it's not changing a zone. [TAP] + * The term "Zone Master" (player) has been replaced by "Shared + Player" in the help. [TAP] + * Many obsolete db formats are no longer readable. hdrs/oldattrib.h + and src/convdb.c are no more. [SW] + * Code cleanup. [SW] + Fixes: + * Help file for mix updated. Report by Cmintrnt@M*U*S*H + * Updated win32 config.h file and other fixes by Noltar@Korongil + * WHO wasn't showing unconnected players. Report by Noltar@Korongil. [SW] + * Help fixes. [SW] + + & 1.7.5p0 Version 1.7.5 patchlevel 0 November 14, 2001 Major Changes: *************** *** 34,40 **** Functions: * mix() can take more than 10 lists and of unequal length. [3,SW] * iname() returns the name of an object from inside (honoring nameformat) ! Idea by Jeff Heinin. * lplayers() returns a list of players in the location. Handy for room parents. By Vexon@M*U*S*H. * lvplayers(), lvcon(), lvexits() are like lplayers/lcon/lexits, but --- 59,65 ---- Functions: * mix() can take more than 10 lists and of unequal length. [3,SW] * iname() returns the name of an object from inside (honoring nameformat) ! Idea by Jeffrey@TheHotel. * lplayers() returns a list of players in the location. Handy for room parents. By Vexon@M*U*S*H. * lvplayers(), lvcon(), lvexits() are like lplayers/lcon/lexits, but *************** *** 68,73 **** --- 93,110 ---- * Indentation fixes [SW] * Fixes up to 1.7.4p12 merged in. + & 1.7.4p13 + Version 1.7.4 patchlevel 13 November 30, 2001 + + Minor changes: + * options.h.dist mentions Darwin as well as MacOS X. [DW] + * PCRE updated to 3.7. [SW] + * When CHAN_NAME_LEN is increased beyond 30, the @chan/list header + line is misaligned, and other strange things can happen to + @chan/list. Reported by Bladed Thoth + Fixes: + * Crash bug in chat channels reported by BladedThoth. + & 1.7.4p12 Version 1.7.4 patchlevel 12 November 9, 2001 *************** *** 4966,4977 **** TinyMUSH 2.0's. The option to examine public attributes by default is configurable. & patchlevels For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' ! 1.7.5: 0 ! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 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 --- 5003,5085 ---- TinyMUSH 2.0's. The option to examine public attributes by default is configurable. + & 1.7.5p1 + Version 1.7.5 patchlevel 1 November 14, 2001 + + Minor Changes: + * Many obsolete db formats are no longer readable. hdrs/oldattrib.h + and src/convdb.c are no more. [SW] + * Code cleanup. [SW] + Fixes: + * Help file for mix updated. Report by Cmintrnt@M*U*S*H + * Updated win32 config.h file and other fixes by Noltar@Korongil + * WHO wasn't showing unconnected players. Report by Noltar@Korongil. [SW] + * Help fixes. [SW] + + & 1.7.5p0 + Version 1.7.5 patchlevel 0 November 14, 2001 + + Major Changes: + * This is now the development minor version. This first release includes + relatively few changes, to make converting to it easier. + * Internal changes to the lock system. This requires a new minimal.db, + which is now distributed. [SW] + * Locale-based string collation throughout. + * Only ANSI C compilers are still supported; no more K&R. Files are + gradually going to be converted to ANSI C only. + * There is now an option to make ZMOs and ZMRs not count for + control of objects, only ZMPs. [SW] + Flags: + * The ZONE player flag has been renamed SHARED, to help seperate the + ZMP control-only meaning from the command-matching of ZMOs and ZMRs. [SW] + Commands: + * /preserve switch for @link prevents @chowning. Suggested by Vexon@M*U*S*H + * Admin WHO and SESSION now includes unconnected descriptors. [SW] + * Unconnected descriptors can now be booted. Patch by Bellemore@M*U*S*H. + * Unconnected descriptors can now be paged by admin with page/port. [SW] + Functions: + * mix() can take more than 10 lists and of unequal length. [3,SW] + * iname() returns the name of an object from inside (honoring nameformat) + Idea by Jeffrey@TheHotel. + * lplayers() returns a list of players in the location. Handy for + room parents. By Vexon@M*U*S*H. + * lvplayers(), lvcon(), lvexits() are like lplayers/lcon/lexits, but + leave out dark things (and disconnected players). Handy for room + parents. By Vexon@M*U*S*H. + Minor Changes: + * munge() now passes its delimiter as %1 to make generic sorting easier. [SW] + * Word-based attribute compression is faster than before, for both + compression and decompression. [SW] + * Windows memory-usage information for wizards is now in @uptime, not + @stats [SW] + * Word-based attribute compression stats can be viewed on non-Windows + mushes as well, by defining COMP_STATS. See externs.h for details. [SW] + * Setting of the internal QUEUE and semaphore attributes does not modify + an object's last-modified timestamp. [SW] + * Speaking on a channel that you're gagging is now treated like + speaking on a channel that you're not on. Suggested by rodregis@M*U*S*H + * You can use @exitto in place of &DESTINATION to set the destinatino + for variable exits, though DESTINATION is checked first. [3] + * WATCHER is another name for the MONITOR flag. [3] + * max_guest_pennies and guest_paycheck config options. Inspired by [SW] + * Lock and unlock messages now show object name and dbref, and tell + you if you unlock an already unlocked object. Suggested by Jamie Warren. + * A version of portmsg for Win32 is in the win32 directory. + Donated by CU5@WCX + * Tweaks to info_slave, which now uses readv/writev. [SW] + * Lots of code cleanup. [SW] + * CHAT_SYSTEM, INFO_SLAVE, and FUNCTION_SIDE_EFFECTS are now #define'd + by default. [TAP] + Fixes: + * Indentation fixes [SW] + * Fixes up to 1.7.4p12 merged in. + & patchlevels For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' ! 1.7.5: 0, 0, 1, 1 ! 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 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_5.37/game/txt/hlp/penntop.hlp Mon, 05 Nov 2001 10:54:17 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.2 600) --- 1_7_5.44(w)/game/txt/hlp/penntop.hlp Thu, 22 Nov 2001 15:39:22 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.3 600) *************** *** 329,337 **** TRUST, O controls V if O passes the zone-lock of the SHARED player. Step 6 is skipped if config(zone_control_zmp_only) is on. ! There's also one special case: anyone can @link an unlinked exit, ! See also: controls(), TRUST, ZONES, ZONE MASTERS & COSTS These are usually: --- 329,338 ---- TRUST, O controls V if O passes the zone-lock of the SHARED player. Step 6 is skipped if config(zone_control_zmp_only) is on. ! There's also one special case: anyone can @link an unlinked exit ! (at which point the exit is @chowned to the linker). ! See also: controls(), TRUST, ZONES, SHARED PLAYERS & COSTS These are usually: *************** *** 1668,1674 **** & ZMR Zone master rooms are a subset of zones. If a room is used as a zone ! object, it is a zone master room (ZMR). ZMRs are like local "master" rooms. Exits in the ZMR are global to that zone, and $commands on objects in the ZMR are global to that zone. Zone master rooms are only defined if globals are used. Zone master rooms are best used for --- 1669,1675 ---- & ZMR Zone master rooms are a subset of zones. If a room is used as a zone ! master, it is a zone master room (ZMR). ZMRs are like local "master" rooms. Exits in the ZMR are global to that zone, and $commands on objects in the ZMR are global to that zone. Zone master rooms are only defined if globals are used. Zone master rooms are best used for *************** *** 1676,1720 **** restricted commands that can go on a separate use-locked object from general ones. - Only other rooms can have a ZMR as their zone. - See also: ZONES, MASTER ROOM, EVALUATION & ZONE MASTERS & ZMP ! ZONE MASTERS ! Zone Masters are player objects which are used to mediate shared control ! of objects. A Zone Master is an object of type PLAYER which has the SHARED ! flag set. They are created like ordinary players, and can connect, build, ! etc. The only difference is that objects owned by Zone Masters are ! controlled by anything that passes the @lock/zone of the Zone Master. ! Anyone who passes the @lock/zone of the Zone Master can @chown objects to it. This, however, does not refund the original creator's money or quota, as does normal. ! Despite the historical similarity in names, Zone Masters aren't related ! to zone objects or zone master rooms, which control what is scanned ! for user-defined commands. ! ! Continued in HELP ZONE MASTERS2 ! & ZONE MASTERS2 ! Some suggested uses of zone masters: 1. If you are working on a building project with several people, it ! may be useful to create a zone master and @lock/zone it to all of you, ! That way, all of the players working on the project will be able to ! modify the building, as long as the zone master owns all the objects ! being built. ! 2. If local wizards are desired, a zone master may be created and zone locked to the local wizards. Players building within that zone should ! be @chowning to the zone master, or logged in as it while creating objects. The local wizard will then be able to control anything within ! that domain as long as the object in question is owned by the zone ! master. & ZONES & ZONE OBJECTS & ZMO Zones are areas of the MUSH that can have the same user-defined commands without having to @parent every object in the zone or make the commands --- 1677,1722 ---- restricted commands that can go on a separate use-locked object from general ones. See also: ZONES, MASTER ROOM, EVALUATION & ZONE MASTERS & ZMP ! & SHARED PLAYERS ! SHARED PLAYERS ! Shared players are player objects which are used to mediate shared ! control of objects. A shared player is an object of type PLAYER which ! has the SHARED flag set. They are created like ordinary players, and ! can connect, build, etc. The only difference is that objects owned by ! a shared player are controlled by anything that passes the @lock/zone ! of the shared player. ! Anyone who passes the @lock/zone of the shared player can @chown objects to it. This, however, does not refund the original creator's money or quota, as does normal. ! Shared players used to be known as Zone Masters. The term was changed ! to emphasize the fact that they are not related to zone master objects, ! which are used to affect search order for user-defined commands. ! ! Continued in HELP SHARED PLAYERS2 ! & SHARED PLAYERS2 ! Some suggested uses of shared players: 1. If you are working on a building project with several people, it ! may be useful to create a shared player and @lock/zone it to all of ! you. That way, all of the players working on the project will be ! able to modify the building, as long as the shared player owns all ! the objects being built. ! 2. If local wizards are desired, a shared player may be created and zone locked to the local wizards. Players building within that zone should ! be @chowning to the shared player, or logged in as it while creating objects. The local wizard will then be able to control anything within ! that domain as long as the object in question is owned by the shared ! player. & ZONES & ZONE OBJECTS + & ZONE MASTER OBJECTS & ZMO Zones are areas of the MUSH that can have the same user-defined commands without having to @parent every object in the zone or make the commands *************** *** 1743,1749 **** ZMO, and the players @chzoned to it so they can use the commands anywhere. ! See also: @chzone, ZONE MASTERS & matching Matching is the process the MUSH uses to determine which object you mean when you try to do something with an object. Different commands --- 1745,1751 ---- ZMO, and the players @chzoned to it so they can use the commands anywhere. ! See also: @chzone, SHARED PLAYERS & matching Matching is the process the MUSH uses to determine which object you mean when you try to do something with an object. Different commands *** 1_7_5.37/game/txt/hlp/pennfunc.hlp Mon, 05 Nov 2001 10:54:17 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.3 600) --- 1_7_5.44(w)/game/txt/hlp/pennfunc.hlp Tue, 20 Nov 2001 09:32:09 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.4 600) *************** *** 1977,1986 **** It can take any number of arguments. & MIX() ! mix([/],,[,...,],[]) This function is similar to MAP(), except that it takes the elements ! of from two to ten lists, one by one, and passes them to the user-defined function as %0, %1, up to %9, respectively, for elements of to . If the lists are of different sizes, the shorter ones are padded with empty elements. is used to separate elements; if it is not --- 1977,1986 ---- It can take any number of arguments. & MIX() ! mix([/],,[,...,],[]) This function is similar to MAP(), except that it takes the elements ! of two or more lists, one by one, and passes them to the user-defined function as %0, %1, up to %9, respectively, for elements of to . If the lists are of different sizes, the shorter ones are padded with empty elements. is used to separate elements; if it is not *** 1_7_5.37/game/txt/hlp/penncmd.hlp Fri, 09 Nov 2001 13:25:20 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.2 600) --- 1_7_5.44(w)/game/txt/hlp/penncmd.hlp Thu, 22 Nov 2001 15:39:22 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.4 600) *************** *** 460,480 **** See also: @chown & @chzone ! @chzone = @chzone =none The first form of this command changes the ZONE of to ! . This puts the object on that zone and allows anyone ! who passes the zone-lock of the zone object to make changes to the ! object. Any kind of object can be @chzoned, but exits cannot be used ! as zone objects. The second form of this command resets the zone of to *NOTHING*. Anyone can reset the zone of an object s/he owns. If a player is @chzoned, anything s/he makes afterwards will start out with that Zone, but none of the objects that s/he presently owns will ! have their Zone changed. Players can @chzone themselves to an object if they own it. Otherwise, only wizards can @chzone players. (continued in help @chzone2) --- 460,481 ---- See also: @chown & @chzone ! @chzone = @chzone =none The first form of this command changes the ZONE of to ! . This puts the object on that zone and may (if the ! zone_control_zmp_only option is off) allow anyone who passes the ! zone-lock of the zone master to make changes to the object. Any ! kind of object can be @chzoned, and any kind of object can be used ! as the zone master. The second form of this command resets the zone of to *NOTHING*. Anyone can reset the zone of an object s/he owns. If a player is @chzoned, anything s/he makes afterwards will start out with that Zone, but none of the objects that s/he presently owns will ! have their Zone changed. Players can @chzone themselves to a master if they own it. Otherwise, only wizards can @chzone players. (continued in help @chzone2) *************** *** 484,494 **** to examine it. The Zone is listed on the same line as the Owner of the object. ! Players can @chzone objects they own if they own the zone object or if they pass its @lock/chzone. Wizards can @chzone objects to any ! zone object as long as the object has a zone-lock. ! Whenever an object besides a player is @chzoned to a zone object, the WIZARD, ROYALTY, and TRUST flags will be reset, as will all @power's (for security purposes). For similar reasons, it is strongly recommended that you do not @chzone admin- or wizard-owned objects to any zone --- 485,495 ---- to examine it. The Zone is listed on the same line as the Owner of the object. ! Players can @chzone objects they own if they own the zone master or if they pass its @lock/chzone. Wizards can @chzone objects to any ! zone master as long as the object has a zone-lock. ! Whenever an object besides a player is @chzoned to a zone master, the WIZARD, ROYALTY, and TRUST flags will be reset, as will all @power's (for security purposes). For similar reasons, it is strongly recommended that you do not @chzone admin- or wizard-owned objects to any zone *************** *** 496,517 **** See also: ZONES, @chzoneall & @chzoneall ! @chzoneall = ! Changes the zone of all objects owned by to . If is "none", the zone is reset to NOTHING. Only wizards may use this command. See also: @chzone, ZONES & @clone ! @clone ! @clone/preserve For objects, creates an exact duplicate of it and puts it in the current room. For exits, it creates an exact duplicate of that exit, except the clone's source is the current room rather than whatever the original exit's source was. For rooms, creates an ! exact duplicate of the room, without contents or exits. If creation times are enabled, a clone will have a different creation time than the object it was cloned from, but will have the same --- 497,520 ---- See also: ZONES, @chzoneall & @chzoneall ! @chzoneall = ! Changes the zone of all objects owned by to . If is "none", the zone is reset to NOTHING. Only wizards may use this command. See also: @chzone, ZONES & @clone ! @clone [=] ! @clone/preserve [=] For objects, creates an exact duplicate of it and puts it in the current room. For exits, it creates an exact duplicate of that exit, except the clone's source is the current room rather than whatever the original exit's source was. For rooms, creates an ! exact duplicate of the room, without contents or exits. The name ! of the duplicate object can be provided; it defaults to the same ! as the name of the original object. If creation times are enabled, a clone will have a different creation time than the object it was cloned from, but will have the same *** 1_7_5.37/game/mushcnf.dst Thu, 08 Nov 2001 18:35:57 -0600 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.4 600) --- 1_7_5.44(w)/game/mushcnf.dst Mon, 03 Dec 2001 10:23:48 -0600 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.6 600) *************** *** 167,172 **** --- 167,175 ---- # What's the maximum number of levels of parenting allowed max_parents 10 + # What's the max chain length of indirect locks allowed? + max_depth 10 + # How much does it cost a mortal to create a channel? chan_cost 1000 *************** *** 241,246 **** --- 244,254 ---- # The password that must be given to do an @logwipe. You must also # be God, of course. CHANGE THIS. log_wipe_passwd zap! + + # The maximum length of player names. Lowering this won't change + # current player names. This number should be one greater than the + # actual maximum length you want. + player_name_len 16 ### ### Dump stuff *** 1_7_5.37/src/wiz.c Wed, 14 Nov 2001 14:49:26 -0600 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.4 660) --- 1_7_5.44(w)/src/wiz.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.5 660) *************** *** 877,883 **** if (!strcasecmp(target, "none")) zone = NOTHING; else { ! switch (zone = match_result(player, target, TYPE_THING, MAT_LIMITED)) { case NOTHING: notify(player, T("I can't seem to find that.")); return; --- 877,883 ---- if (!strcasecmp(target, "none")) zone = NOTHING; else { ! switch (zone = match_result(player, target, NOTYPE, MAT_EVERYTHING)) { case NOTHING: notify(player, T("I can't seem to find that.")); return; *************** *** 885,900 **** notify(player, T("I don't know which one you mean!")); return; } - if (!IsThing(zone)) { - notify(player, T("Invalid zone object type.")); - return; - } } for (i = 0; i < db_top; i++) { ! if (Owner(i) == victim) { ! Zone(i) = zone; ! count++; } } notify(player, tprintf(T("Zone changed for %d objects."), count)); --- 885,898 ---- notify(player, T("I don't know which one you mean!")); return; } } + /* Okay, now that we know we're not going to spew all sorts of errors, + * call the normal do_chzone for all the relevant objects. This keeps + * consistency on things like flag resetting, etc... */ for (i = 0; i < db_top; i++) { ! if (Owner(i) == victim && Zone(i) != zone) { ! count += do_chzone(player, unparse_dbref(i), target, 0); } } notify(player, tprintf(T("Zone changed for %d objects."), count)); *** 1_7_5.37/src/htab.c Mon, 29 Oct 2001 13:52:04 -0600 dunemush (pennmush/b/30_htab.c 1.8.1.4 660) --- 1_7_5.44(w)/src/htab.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/b/30_htab.c 1.8.1.5 660) *************** *** 6,16 **** #include "config.h" #include "copyrite.h" - #ifdef I_STRING #include - #else - #include - #endif #include "conf.h" #include "externs.h" --- 6,12 ---- *************** *** 26,38 **** #ifdef NEW_HASH_FUN /* This hash function adapted from http://burtleburtle.net/bob/hash/evahash.html */ ! #ifdef CAN_NEWSTYLE typedef unsigned long int u4; /* unsigned 4-byte type */ typedef unsigned char u1; /* unsigned 1-byte type */ - #else - #define u4 unsigned long int - #define u1 unsigned int - #endif /* The mixing step */ #define mix(a,b,c) \ --- 22,30 ---- #ifdef NEW_HASH_FUN /* This hash function adapted from http://burtleburtle.net/bob/hash/evahash.html */ ! typedef unsigned long int u4; /* unsigned 4-byte type */ typedef unsigned char u1; /* unsigned 1-byte type */ /* The mixing step */ #define mix(a,b,c) \ *** 1_7_5.37/src/switchinc.c Wed, 14 Nov 2001 14:49:26 -0600 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.3 660) --- 1_7_5.44(w)/src/switchinc.c Mon, 03 Dec 2001 10:24:04 -0600 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.3 660) *************** *** 1,388 **** { ! "ACCESS", SWITCH_ACCESS} ! ! , { ! "ADD", SWITCH_ADD} ! ! , { ! "ALL", SWITCH_ALL} ! ! , { ! "ATTRIBS", SWITCH_ATTRIBS} ! ! , { ! "BAN", SWITCH_BAN} ! ! , { ! "BLIND", SWITCH_BLIND} ! ! , { ! "BRIEF", SWITCH_BRIEF} ! ! , { ! "CHECK", SWITCH_CHECK} ! ! , { ! "CHOWN", SWITCH_CHOWN} ! ! , { ! "CLEAR", SWITCH_CLEAR} ! ! , { ! "CMD", SWITCH_CMD} ! ! , { ! "COMMANDS", SWITCH_COMMANDS} ! ! , { ! "CONN", SWITCH_CONN} ! ! , { ! "CONNECT", SWITCH_CONNECT} ! ! , { ! "CONNECTED", SWITCH_CONNECTED} ! ! , { ! "CONTENTS", SWITCH_CONTENTS} ! ! , { ! "COSTS", SWITCH_COSTS} ! ! , { ! "COUNT", SWITCH_COUNT} ! ! , { ! "CREATE", SWITCH_CREATE} ! ! , { ! "DATABASE", SWITCH_DATABASE} ! ! , { ! "DB", SWITCH_DB} ! ! , { ! "DEBUG", SWITCH_DEBUG} ! ! , { ! "DECOMPILE", SWITCH_DECOMPILE} ! ! , { ! "DEFAULTS", SWITCH_DEFAULTS} ! ! , { ! "DELETE", SWITCH_DELETE} ! ! , { ! "DELIMIT", SWITCH_DELIMIT} ! ! , { ! "DESCRIBE", SWITCH_DESCRIBE} ! ! , { ! "DESTROY", SWITCH_DESTROY} ! ! , { ! "DISABLE", SWITCH_DISABLE} ! ! , { ! "DOWN", SWITCH_DOWN} ! ! , { ! "DSTATS", SWITCH_DSTATS} ! ! , { ! "EMIT", SWITCH_EMIT} ! ! , { ! "ENABLE", SWITCH_ENABLE} ! ! , { ! "ERR", SWITCH_ERR} ! ! , { ! "EXITS", SWITCH_EXITS} ! ! , { ! "FILE", SWITCH_FILE} ! ! , { ! "FIRST", SWITCH_FIRST} ! ! , { ! "FLAGS", SWITCH_FLAGS} ! ! , { ! "FOLDERS", SWITCH_FOLDERS} ! ! , { ! "FORWARD", SWITCH_FORWARD} ! ! , { ! "FSTATS", SWITCH_FSTATS} ! ! , { ! "FULL", SWITCH_FULL} ! ! , { ! "FUNCTIONS", SWITCH_FUNCTIONS} ! ! , { ! "FWD", SWITCH_FWD} ! ! , { ! "GAG", SWITCH_GAG} ! ! , { ! "GLOBALS", SWITCH_GLOBALS} ! ! , { ! "HEADER", SWITCH_HEADER} ! ! , { ! "HERE", SWITCH_HERE} ! ! , { ! "HIDE", SWITCH_HIDE} ! ! , { ! "ILIST", SWITCH_ILIST} ! ! , { ! "INVENTORY", SWITCH_INVENTORY} ! ! , { ! "IPRINT", SWITCH_IPRINT} ! ! , { ! "JOIN", SWITCH_JOIN} ! ! , { ! "LIST", SWITCH_LIST} ! ! , { ! "LOWERCASE", SWITCH_LOWERCASE} ! ! , { ! "ME", SWITCH_ME} ! ! , { ! "MEMBERS", SWITCH_MEMBERS} ! ! , { ! "MOD", SWITCH_MOD} ! ! , { ! "MORTAL", SWITCH_MORTAL} ! ! , { ! "MOTD", SWITCH_MOTD} ! ! , { ! "MUTE", SWITCH_MUTE} ! ! , { ! "NAME", SWITCH_NAME} ! ! , { ! "NO", SWITCH_NO} ! ! , { ! "NOEVAL", SWITCH_NOEVAL} ! ! , { ! "NOFLAGCOPY", SWITCH_NOFLAGCOPY} ! ! , { ! "NOISY", SWITCH_NOISY} ! ! , { ! "NOSIG", SWITCH_NOSIG} ! ! , { ! "NOSPACE", SWITCH_NOSPACE} ! ! , { ! "NOTIFY", SWITCH_NOTIFY} ! ! , { ! "NUKE", SWITCH_NUKE} ! ! , { ! "OFF", SWITCH_OFF} ! ! , { ! "ON", SWITCH_ON} ! ! , { ! "OUTSIDE", SWITCH_OUTSIDE} ! ! , { ! "OVERRIDE", SWITCH_OVERRIDE} ! ! , { ! "PANIC", SWITCH_PANIC} ! ! , { ! "PARANOID", SWITCH_PARANOID} ! ! , { ! "PLAYERS", SWITCH_PLAYERS} ! ! , { ! "PORT", SWITCH_PORT} ! ! , { ! "POSE", SWITCH_POSE} ! ! , { ! "PRESERVE", SWITCH_PRESERVE} ! ! , { ! "PRINT", SWITCH_PRINT} ! ! , { ! "PRIVS", SWITCH_PRIVS} ! ! , { ! "PURGE", SWITCH_PURGE} ! ! , { ! "QUICK", SWITCH_QUICK} ! ! , { ! "QUIET", SWITCH_QUIET} ! ! , { ! "READ", SWITCH_READ} ! ! , { ! "REBOOT", SWITCH_REBOOT} ! ! , { ! "REGISTER", SWITCH_REGISTER} ! ! , { ! "REMOVE", SWITCH_REMOVE} ! ! , { ! "RENAME", SWITCH_RENAME} ! ! , { ! "RESTORE", SWITCH_RESTORE} ! ! , { ! "RESTRICT", SWITCH_RESTRICT} ! ! , { ! "RETROACTIVE", SWITCH_RETROACTIVE} ! ! , { ! "ROOM", SWITCH_ROOM} ! ! , { ! "ROOMS", SWITCH_ROOMS} ! ! , { ! "ROYALTY", SWITCH_ROYALTY} ! ! , { ! "SEE", SWITCH_SEE} ! ! , { ! "SEEFLAG", SWITCH_SEEFLAG} ! ! , { ! "SELF", SWITCH_SELF} ! ! , { ! "SEND", SWITCH_SEND} ! ! , { ! "SET", SWITCH_SET} ! ! , { ! "SILENT", SWITCH_SILENT} ! ! , { ! "SKIPDEFAULTS", SWITCH_SKIPDEFAULTS} ! ! , { ! "SPEAK", SWITCH_SPEAK} ! ! , { ! "STATS", SWITCH_STATS} ! ! , { ! "SUMMARY", SWITCH_SUMMARY} ! ! , { ! "TABLES", SWITCH_TABLES} ! ! , { ! "TAG", SWITCH_TAG} ! ! , { ! "TELEPORT", SWITCH_TELEPORT} ! ! , { ! "TF", SWITCH_TF} ! ! , { ! "THINGS", SWITCH_THINGS} ! ! , { ! "TITLE", SWITCH_TITLE} ! ! , { ! "TRACE", SWITCH_TRACE} ! ! , { ! "UNCLEAR", SWITCH_UNCLEAR} ! ! , { ! "UNFOLDER", SWITCH_UNFOLDER} ! ! , { ! "UNGAG", SWITCH_UNGAG} ! ! , { ! "UNHIDE", SWITCH_UNHIDE} ! ! , { ! "UNMUTE", SWITCH_UNMUTE} ! ! , { ! "UNTAG", SWITCH_UNTAG} ! ! , { ! "UNTIL", SWITCH_UNTIL} ! ! , { ! "URGENT", SWITCH_URGENT} ! ! , { ! "USEFLAG", SWITCH_USEFLAG} ! ! , { ! "WHAT", SWITCH_WHAT} ! ! , { ! "WHO", SWITCH_WHO} ! ! , { ! "WIPE", SWITCH_WIPE} ! ! , { ! "WIZ", SWITCH_WIZ} ! ! , { ! "WIZARD", SWITCH_WIZARD} ! ! , { ! "YES", SWITCH_YES} ! ! , { ! "ZONE", SWITCH_ZONE} ! , --- 1,516 ---- { ! "ACCESS", SWITCH_ACCESS ! } ! , ! { ! "ADD", SWITCH_ADD ! } ! , ! { ! "ALL", SWITCH_ALL ! } ! , ! { ! "ATTRIBS", SWITCH_ATTRIBS ! } ! , ! { ! "BAN", SWITCH_BAN ! } ! , ! { ! "BLIND", SWITCH_BLIND ! } ! , ! { ! "BRIEF", SWITCH_BRIEF ! } ! , ! { ! "CHECK", SWITCH_CHECK ! } ! , ! { ! "CHOWN", SWITCH_CHOWN ! } ! , ! { ! "CLEAR", SWITCH_CLEAR ! } ! , ! { ! "CMD", SWITCH_CMD ! } ! , ! { ! "COMMANDS", SWITCH_COMMANDS ! } ! , ! { ! "CONN", SWITCH_CONN ! } ! , ! { ! "CONNECT", SWITCH_CONNECT ! } ! , ! { ! "CONNECTED", SWITCH_CONNECTED ! } ! , ! { ! "CONTENTS", SWITCH_CONTENTS ! } ! , ! { ! "COSTS", SWITCH_COSTS ! } ! , ! { ! "COUNT", SWITCH_COUNT ! } ! , ! { ! "CREATE", SWITCH_CREATE ! } ! , ! { ! "DATABASE", SWITCH_DATABASE ! } ! , ! { ! "DB", SWITCH_DB ! } ! , ! { ! "DEBUG", SWITCH_DEBUG ! } ! , ! { ! "DECOMPILE", SWITCH_DECOMPILE ! } ! , ! { ! "DEFAULTS", SWITCH_DEFAULTS ! } ! , ! { ! "DELETE", SWITCH_DELETE ! } ! , ! { ! "DELIMIT", SWITCH_DELIMIT ! } ! , ! { ! "DESCRIBE", SWITCH_DESCRIBE ! } ! , ! { ! "DESTROY", SWITCH_DESTROY ! } ! , ! { ! "DISABLE", SWITCH_DISABLE ! } ! , ! { ! "DOWN", SWITCH_DOWN ! } ! , ! { ! "DSTATS", SWITCH_DSTATS ! } ! , ! { ! "EMIT", SWITCH_EMIT ! } ! , ! { ! "ENABLE", SWITCH_ENABLE ! } ! , ! { ! "ERR", SWITCH_ERR ! } ! , ! { ! "EXITS", SWITCH_EXITS ! } ! , ! { ! "FILE", SWITCH_FILE ! } ! , ! { ! "FIRST", SWITCH_FIRST ! } ! , ! { ! "FLAGS", SWITCH_FLAGS ! } ! , ! { ! "FOLDERS", SWITCH_FOLDERS ! } ! , ! { ! "FORWARD", SWITCH_FORWARD ! } ! , ! { ! "FSTATS", SWITCH_FSTATS ! } ! , ! { ! "FULL", SWITCH_FULL ! } ! , ! { ! "FUNCTIONS", SWITCH_FUNCTIONS ! } ! , ! { ! "FWD", SWITCH_FWD ! } ! , ! { ! "GAG", SWITCH_GAG ! } ! , ! { ! "GLOBALS", SWITCH_GLOBALS ! } ! , ! { ! "HEADER", SWITCH_HEADER ! } ! , ! { ! "HERE", SWITCH_HERE ! } ! , ! { ! "HIDE", SWITCH_HIDE ! } ! , ! { ! "ILIST", SWITCH_ILIST ! } ! , ! { ! "INVENTORY", SWITCH_INVENTORY ! } ! , ! { ! "IPRINT", SWITCH_IPRINT ! } ! , ! { ! "JOIN", SWITCH_JOIN ! } ! , ! { ! "LIST", SWITCH_LIST ! } ! , ! { ! "LOWERCASE", SWITCH_LOWERCASE ! } ! , ! { ! "ME", SWITCH_ME ! } ! , ! { ! "MEMBERS", SWITCH_MEMBERS ! } ! , ! { ! "MOD", SWITCH_MOD ! } ! , ! { ! "MORTAL", SWITCH_MORTAL ! } ! , ! { ! "MOTD", SWITCH_MOTD ! } ! , ! { ! "MUTE", SWITCH_MUTE ! } ! , ! { ! "NAME", SWITCH_NAME ! } ! , ! { ! "NO", SWITCH_NO ! } ! , ! { ! "NOEVAL", SWITCH_NOEVAL ! } ! , ! { ! "NOFLAGCOPY", SWITCH_NOFLAGCOPY ! } ! , ! { ! "NOISY", SWITCH_NOISY ! } ! , ! { ! "NOSIG", SWITCH_NOSIG ! } ! , ! { ! "NOSPACE", SWITCH_NOSPACE ! } ! , ! { ! "NOTIFY", SWITCH_NOTIFY ! } ! , ! { ! "NUKE", SWITCH_NUKE ! } ! , ! { ! "OFF", SWITCH_OFF ! } ! , ! { ! "ON", SWITCH_ON ! } ! , ! { ! "OUTSIDE", SWITCH_OUTSIDE ! } ! , ! { ! "OVERRIDE", SWITCH_OVERRIDE ! } ! , ! { ! "PANIC", SWITCH_PANIC ! } ! , ! { ! "PARANOID", SWITCH_PARANOID ! } ! , ! { ! "PLAYERS", SWITCH_PLAYERS ! } ! , ! { ! "PORT", SWITCH_PORT ! } ! , ! { ! "POSE", SWITCH_POSE ! } ! , ! { ! "PRESERVE", SWITCH_PRESERVE ! } ! , ! { ! "PRINT", SWITCH_PRINT ! } ! , ! { ! "PRIVS", SWITCH_PRIVS ! } ! , ! { ! "PURGE", SWITCH_PURGE ! } ! , ! { ! "QUICK", SWITCH_QUICK ! } ! , ! { ! "QUIET", SWITCH_QUIET ! } ! , ! { ! "READ", SWITCH_READ ! } ! , ! { ! "REBOOT", SWITCH_REBOOT ! } ! , ! { ! "REGISTER", SWITCH_REGISTER ! } ! , ! { ! "REMOVE", SWITCH_REMOVE ! } ! , ! { ! "RENAME", SWITCH_RENAME ! } ! , ! { ! "RESTORE", SWITCH_RESTORE ! } ! , ! { ! "RESTRICT", SWITCH_RESTRICT ! } ! , ! { ! "RETROACTIVE", SWITCH_RETROACTIVE ! } ! , ! { ! "ROOM", SWITCH_ROOM ! } ! , ! { ! "ROOMS", SWITCH_ROOMS ! } ! , ! { ! "ROYALTY", SWITCH_ROYALTY ! } ! , ! { ! "SEE", SWITCH_SEE ! } ! , ! { ! "SEEFLAG", SWITCH_SEEFLAG ! } ! , ! { ! "SELF", SWITCH_SELF ! } ! , ! { ! "SEND", SWITCH_SEND ! } ! , ! { ! "SET", SWITCH_SET ! } ! , ! { ! "SILENT", SWITCH_SILENT ! } ! , ! { ! "SKIPDEFAULTS", SWITCH_SKIPDEFAULTS ! } ! , ! { ! "SPEAK", SWITCH_SPEAK ! } ! , ! { ! "STATS", SWITCH_STATS ! } ! , ! { ! "SUMMARY", SWITCH_SUMMARY ! } ! , ! { ! "TABLES", SWITCH_TABLES ! } ! , ! { ! "TAG", SWITCH_TAG ! } ! , ! { ! "TELEPORT", SWITCH_TELEPORT ! } ! , ! { ! "TF", SWITCH_TF ! } ! , ! { ! "THINGS", SWITCH_THINGS ! } ! , ! { ! "TITLE", SWITCH_TITLE ! } ! , ! { ! "TRACE", SWITCH_TRACE ! } ! , ! { ! "UNCLEAR", SWITCH_UNCLEAR ! } ! , ! { ! "UNFOLDER", SWITCH_UNFOLDER ! } ! , ! { ! "UNGAG", SWITCH_UNGAG ! } ! , ! { ! "UNHIDE", SWITCH_UNHIDE ! } ! , ! { ! "UNMUTE", SWITCH_UNMUTE ! } ! , ! { ! "UNTAG", SWITCH_UNTAG ! } ! , ! { ! "UNTIL", SWITCH_UNTIL ! } ! , ! { ! "URGENT", SWITCH_URGENT ! } ! , ! { ! "USEFLAG", SWITCH_USEFLAG ! } ! , ! { ! "WHAT", SWITCH_WHAT ! } ! , ! { ! "WHO", SWITCH_WHO ! } ! , ! { ! "WIPE", SWITCH_WIPE ! } ! , ! { ! "WIZ", SWITCH_WIZ ! } ! , ! { ! "WIZARD", SWITCH_WIZARD ! } ! , ! { ! "YES", SWITCH_YES ! } ! , ! { ! "ZONE", SWITCH_ZONE ! } , *** 1_7_5.37/src/strutil.c Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.8 660) --- 1_7_5.44(w)/src/strutil.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.9 660) *************** *** 5,23 **** #include "config.h" #include - #ifdef I_STRING #include - #else - #include - #endif - #ifdef I_STDLIB #include - #endif - #ifdef I_STDARG #include - #else - #include - #endif #ifdef I_MEMORY #include #endif --- 5,13 ---- *************** *** 212,225 **** return len - clen - #ifdef CAN_NEWSTYLE int safe_format(char *buff, char **bp, const char *fmt, ...) - #else - int - safe_format(va_alist) - va_dcl - #endif { APPEND_ARGS; #ifdef HAS_VSNPRINTF --- 202,209 ---- *************** *** 228,245 **** char c[BUFFER_LEN * 3]; #endif va_list args; ! #ifndef I_STDARG ! char *buff; ! char **bp; ! const char *fmt; ! ! va_start(args); ! buff = va_arg(args, char *); ! bp = va_arg(args, char **); ! fmt = va_arg(args, const char *); ! #else va_start(args, fmt); - #endif #ifdef HAS_VSNPRINTF vsnprintf(c, sizeof c, fmt, args); --- 212,219 ---- char c[BUFFER_LEN * 3]; #endif va_list args; ! va_start(args, fmt); #ifdef HAS_VSNPRINTF vsnprintf(c, sizeof c, fmt, args); *************** *** 252,284 **** APPEND_TO_BUF(BUFFER_LEN - 1); } - #ifdef CAN_NEWSTYLE int safe_integer_len(int i, char *buff, char **bp, int maxlen) - #else - int - safe_integer_len(i, buff, bp, maxlen) - int i; - char *buff; - char **bp; - int maxlen; - #endif { /* Adds a int to a string, being careful not to overflow buffer */ return format_long(i, buff, bp, maxlen); } - #ifdef CAN_NEWSTYLE int safe_dbref_len(dbref d, char *buff, char **bp, int maxlen) - #else - int - safe_dbref_len(d, buff, bp, maxlen) - dbref d; - char *buff; - char **bp; - int maxlen; - #endif { /* Adds a dbref to a string, being careful not to overflow buffer */ if (safe_chr('#', buff, bp)) --- 226,240 ---- *************** *** 287,302 **** } - #ifdef CAN_NEWSTYLE int safe_number(NVAL n, char *buff, char **bp) - #else - int - safe_number(NVAL, buff, bp) - NVAL n; - char *buff; - char **bp; - #endif { /* Adds a number to a string, being careful not to overflow buffer */ const char *c; --- 243,250 ---- *************** *** 310,325 **** * but safe_chr now returns 1 on FAILURE, not success, to match safe_copy_str */ #ifdef SAFE_CHR_FUNCTION - #ifdef CAN_NEWSTYLE int safe_chr(char c, char *buf, char **bufp) - #else - int - safe_chr(c, buf, bufp) - char c; - char *buf; - char **bufp; - #endif { /* adds a character to a string, being careful not to overflow buffer */ --- 258,265 ---- *************** *** 390,404 **** return c; } - #ifdef CAN_NEWSTYLE char * seek_char(const char *s, char c) - #else - char * - seek_char(s, c) - const char *s; - char c; - #endif { /* similar to strchr(). returns a pointer to the next char in s which * matches c, or a pointer to the terminating null at the end of s. --- 330,337 ---- *************** *** 475,489 **** return result; } - #ifdef CAN_NEWSTYLE char * trim_space_sep(char *str, char sep) - #else - char * - trim_space_sep(str, sep) - char *str; - char sep; - #endif { /* Trim leading and trailing spaces if we've got a space separator. */ --- 408,415 ---- *************** *** 500,514 **** return str; } - #ifdef CAN_NEWSTYLE char * next_token(char *str, char sep) - #else - char * - next_token(str, sep) - char *str; - char sep; - #endif { /* move pointer to start of the next token */ --- 426,433 ---- *************** *** 524,538 **** return str; } - #ifdef CAN_NEWSTYLE char * split_token(char **sp, char sep) - #else - char * - split_token(sp, sep) - char **sp; - char sep; - #endif { /* Get next token from string as a null-terminated string, depending * on the separator character. This destructively modifies the string. --- 443,450 ---- *************** *** 561,575 **** return save; } - #ifdef CAN_NEWSTYLE int do_wordcount(char *str, char sep) - #else - int - do_wordcount(str, sep) - char *str; - char sep; - #endif { /* count the number of words in a string */ int n; --- 473,480 ---- *************** *** 662,677 **** /* Given a string, a word, and a separator, remove first occurence * of the word from the string. Destructive. */ - #ifdef CAN_NEWSTYLE char * remove_word(char *list, char *word, char sep) - #else - char * - remove_word(list, word, sep) - char *list; - char *word; - char sep; - #endif { char *sp; char *bp; --- 567,574 ---- *************** *** 771,788 **** * of snprintf. Please try not to use it. */ static int ! format_long(val, buff, bp, maxlen) ! 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 buffer room. */ - char digit; char *current; int size = 0, neg = 0; /* Sanity checks */ if (!bp || !buff || !*bp) --- 668,681 ---- * of snprintf. Please try not to use it. */ 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 buffer room. */ char *current; int size = 0, neg = 0; + ldiv_t r; /* Sanity checks */ if (!bp || !buff || !*bp) *************** *** 806,826 **** /* Take the rightmost digit, and push it onto the stack, then * integer divide by 10 to get to the next digit. */ do { ! digit = val % 10; ! /* I seem to recall C89 requiring that all number chars be in ! * order no matter the character set, '0' to '9'. If not, this can ! * easily be replaced with a table lookup. Talek? */ ! /* I believe the above is correct for the C locale, and we really ! * only care about ASCII, anyway. - Talek */ ! *(--current) = digit + '0'; ! val = val / 10; ! } while (val); ! ! /* Add the negative sign if needed. If we ever use LC_NUMBERIC ! * locale, this section should be changed to use localeconv */ ! /* If we start using LC_NUMERIC, then so much softcode gets hosed ! * that it's not even worth considering. - Talek */ if (neg) *(--current) = '-'; --- 699,714 ---- /* Take the rightmost digit, and push it onto the stack, then * integer divide by 10 to get to the next digit. */ + r.quot = val; do { ! /* ldiv(x, y) does x/y and x%y at the same time (both of ! * which we need). ! */ ! r = ldiv(r.quot, 10); ! *(--current) = r.rem + '0'; ! } while (r.quot); ! ! /* Add the negative sign if needed. */ if (neg) *(--current) = '-'; *************** *** 865,883 **** return 0; } ! #ifdef HAS_STRXFRM int ! strncoll(s1, s2, t) ! const char *s1; ! const char *s2; ! Size_t t; { char *d1, *d2; int result; ! d1 = mush_malloc(sizeof(s1), "string"); ! d2 = mush_malloc(sizeof(s2), "string"); ! (void) strxfrm(d1, s1, strlen(s1)); ! (void) strxfrm(d2, s2, strlen(s2)); result = strncmp(d1, d2, t); mush_free(d1, "string"); mush_free(d2, "string"); --- 753,773 ---- return 0; } ! #if defined(HAS_STRXFRM) && !defined(WIN32) int ! strncoll(const char *s1, const char *s2, size_t t) { char *d1, *d2; int result; ! size_t s1_len, s2_len; ! ! s1_len = strlen(s1); ! s2_len = strlen(s2); ! ! d1 = mush_malloc(s1_len + 1, "string"); ! d2 = mush_malloc(s2_len + 1, "string"); ! (void) strxfrm(d1, s1, s1_len); ! (void) strxfrm(d2, s2, s2_len); result = strncmp(d1, d2, t); mush_free(d1, "string"); mush_free(d2, "string"); *************** *** 885,900 **** } int ! strcasecoll(s1, s2) ! const char *s1; ! const char *s2; { char *d1, *d2; int result; ! d1 = mush_malloc(strlen(s1) + 1, "string"); ! d2 = mush_malloc(strlen(s2) + 1, "string"); ! (void) strxfrm(d1, s1, strlen(s1)); ! (void) strxfrm(d2, s2, strlen(s2)); result = strcasecmp(d1, d2); mush_free(d1, "string"); mush_free(d2, "string"); --- 775,793 ---- } int ! strcasecoll(const char *s1, const char *s2) { char *d1, *d2; int result; ! size_t s1_len, s2_len; ! ! s1_len = strlen(s1); ! s2_len = strlen(s2); ! ! d1 = mush_malloc(s1_len + 1, "string"); ! d2 = mush_malloc(s2_len + 1, "string"); ! (void) strxfrm(d1, s1, s1_len); ! (void) strxfrm(d2, s2, s2_len); result = strcasecmp(d1, d2); mush_free(d1, "string"); mush_free(d2, "string"); *************** *** 902,924 **** } int ! strncasecoll(s1, s2, t) ! const char *s1; ! const char *s2; ! Size_t t; { char *d1, *d2; int result; ! d1 = mush_malloc(strlen(s1) + 1, "string"); ! d2 = mush_malloc(strlen(s2) + 1, "string"); ! (void) strxfrm(d1, s1, strlen(s1)); ! (void) strxfrm(d2, s2, strlen(s2)); result = strncasecmp(d1, d2, t); mush_free(d1, "string"); mush_free(d2, "string"); return result; } ! #endif int ansi_save(string, length, buff, bp) --- 795,819 ---- } int ! strncasecoll(const char *s1, const char *s2, size_t t) { char *d1, *d2; int result; ! size_t s1_len, s2_len; ! ! s1_len = strlen(s1); ! s2_len = strlen(s2); ! ! d1 = mush_malloc(s1_len + 1, "string"); ! d2 = mush_malloc(s2_len + 1, "string"); ! (void) strxfrm(d1, s1, s1_len); ! (void) strxfrm(d2, s2, s2_len); result = strncasecmp(d1, d2, t); mush_free(d1, "string"); mush_free(d2, "string"); return result; } ! #endif /* HAS_STRXFRM && !WIN32 */ int ansi_save(string, length, buff, bp) *** 1_7_5.37/src/speech.c Fri, 26 Oct 2001 10:44:14 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.5 660) --- 1_7_5.44(w)/src/speech.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.6 660) *************** *** 1049,1063 **** } char * ! ns_esnotify(speaker, func, fdata, para) ! dbref speaker; ! #ifdef CAN_TAKE_ARGS_IN_FP ! dbref (*func) (dbref, void *) __attribute__ ((__unused__)); ! #else ! dbref (*func) () __attribute__ ((__unused__)); ! #endif ! void *fdata __attribute__ ((__unused__)); ! int para; { char dest[BUFFER_LEN]; char *ret; --- 1049,1057 ---- } char * ! ns_esnotify(dbref speaker, dbref (*func) (dbref, void *) ! __attribute__ ((__unused__)), void *fdata ! __attribute__ ((__unused__)), int para) { char dest[BUFFER_LEN]; char *ret; *** 1_7_5.37/src/set.c Fri, 26 Oct 2001 10:44:14 -0500 dunemush (pennmush/b/38_set.c 1.26.1.7 660) --- 1_7_5.44(w)/src/set.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/38_set.c 1.26.1.8 660) *************** *** 42,48 **** void do_chown _((dbref player, const char *name, const char *newobj, int preserve)); static int chown_ok _((dbref player, dbref thing, dbref newowner)); ! void do_chzone _((dbref player, const char *name, const char *newobj)); void do_attrib_flags _((dbref player, const char *obj, const char *atrname, const char *flag)); int do_set _((dbref player, const char *name, char *flag)); --- 42,48 ---- void do_chown _((dbref player, const char *name, const char *newobj, int preserve)); static int chown_ok _((dbref player, dbref thing, dbref newowner)); ! int do_chzone(dbref player, const char *name, const char *newobj, int noisy); void do_attrib_flags _((dbref player, const char *obj, const char *atrname, const char *flag)); int do_set _((dbref player, const char *name, char *flag)); *************** *** 321,350 **** } ! void ! do_chzone(player, name, newobj) ! dbref player; ! const char *name; ! const char *newobj; { dbref thing; dbref zone; if ((thing = noisy_match_result(player, name, NOTYPE, MAT_NEARBY)) == NOTHING) ! return; if (!newobj || !*newobj || !strcasecmp(newobj, "none")) zone = NOTHING; else { if ((zone = noisy_match_result(player, newobj, NOTYPE, MAT_EVERYTHING)) == NOTHING) ! return; ! if (!IsThing(zone) ! && (!DO_GLOBALS || !IsRoom(zone))) { ! notify(player, T("Invalid zone object type.")); ! return; ! } } /* we do use ownership instead of control as a criterion because --- 321,347 ---- } ! int ! do_chzone(dbref player, char const *name, char const *newobj, int noisy) { dbref thing; dbref zone; if ((thing = noisy_match_result(player, name, NOTYPE, MAT_NEARBY)) == NOTHING) ! return 0; if (!newobj || !*newobj || !strcasecmp(newobj, "none")) zone = NOTHING; else { if ((zone = noisy_match_result(player, newobj, NOTYPE, MAT_EVERYTHING)) == NOTHING) ! return 0; ! } ! if (Zone(thing) == zone) { ! if (noisy) ! notify(player, T("That object is already in that zone.")); ! return 0; } /* we do use ownership instead of control as a criterion because *************** *** 352,359 **** * this allows players to @chzone themselves to an object they own. */ if (!Wizard(player) && !Owns(player, thing)) { ! notify(player, T("You don't have the power to shift reality.")); ! return; } /* a player may change an object's zone to: * 1. NOTHING --- 349,357 ---- * this allows players to @chzone themselves to an object they own. */ if (!Wizard(player) && !Owns(player, thing)) { ! if (noisy) ! notify(player, T("You don't have the power to shift reality.")); ! return 0; } /* a player may change an object's zone to: * 1. NOTHING *************** *** 364,381 **** if (!(Wizard(player) || (zone == NOTHING) || Owns(player, zone) || ((getlock(zone, Chzone_Lock) != TRUE_BOOLEXP) && eval_lock(player, zone, Chzone_Lock)))) { ! notify(player, T("You cannot move that object to that zone.")); ! return; ! } ! /* only rooms may be zoned to other rooms */ ! if ((zone != NOTHING) && IsRoom(zone) && !IsRoom(thing)) { ! notify(player, T("Only rooms may have zone master rooms.")); ! return; } /* Don't chzone object to itself for mortals! */ if ((zone == thing) && !Hasprivs(player)) { ! notify(player, T("You shouldn't zone objects to themselves!")); ! return; } /* Don't allow chzone to objects without elocks! * This checks for many trivial elocks (canuse/1, where &canuse=1) --- 362,376 ---- if (!(Wizard(player) || (zone == NOTHING) || Owns(player, zone) || ((getlock(zone, Chzone_Lock) != TRUE_BOOLEXP) && eval_lock(player, zone, Chzone_Lock)))) { ! if (noisy) ! notify(player, T("You cannot move that object to that zone.")); ! return 0; } /* Don't chzone object to itself for mortals! */ if ((zone == thing) && !Hasprivs(player)) { ! if (noisy) ! notify(player, T("You shouldn't zone objects to themselves!")); ! return 0; } /* Don't allow chzone to objects without elocks! * This checks for many trivial elocks (canuse/1, where &canuse=1) *************** *** 383,390 **** if (zone != NOTHING) { struct boolexp *key = getlock(zone, Zone_Lock); if (key == TRUE_BOOLEXP) { ! notify(player, T("ZMOs must be zone-locked before you @chzone!")); ! return; } /* Does the player's location pass it? If so, we have either * an inexact or trivial elock */ --- 378,386 ---- if (zone != NOTHING) { struct boolexp *key = getlock(zone, Zone_Lock); if (key == TRUE_BOOLEXP) { ! if (noisy) ! notify(player, T("ZMOs must be zone-locked before you @chzone!")); ! return 0; } /* Does the player's location pass it? If so, we have either * an inexact or trivial elock */ *************** *** 392,410 **** /* Does #0 and #2 pass it? If so, probably trivial elock */ if (eval_lock(PLAYER_START, zone, Zone_Lock) && eval_lock(MASTER_ROOM, zone, Zone_Lock)) { ! notify(player, ! T("ZMO requires a more secure zone-lock before you @chzone!")); ! return; } /* Probably inexact zone lock */ ! notify(player, ! T ! ("Warning: ZMO may have loose zone lock. Lock ZMOs to =player, not player")); } } /* Warn Wiz/Royals when they zone their stuff */ if ((zone != NOTHING) && Hasprivs(Owner(thing))) { ! notify(player, T("Warning: @chzoning admin-owned object!")); } /* everything is okay, do the change */ Zone(thing) = zone; --- 388,409 ---- /* Does #0 and #2 pass it? If so, probably trivial elock */ if (eval_lock(PLAYER_START, zone, Zone_Lock) && eval_lock(MASTER_ROOM, zone, Zone_Lock)) { ! if (noisy) ! notify(player, ! T("ZMO requires a more secure zone-lock before you @chzone!")); ! return 0; } /* Probably inexact zone lock */ ! if (noisy) ! notify(player, ! T ! ("Warning: ZMO may have loose zone lock. Lock ZMOs to =player, not player")); } } /* Warn Wiz/Royals when they zone their stuff */ if ((zone != NOTHING) && Hasprivs(Owner(thing))) { ! if (noisy) ! notify(player, T("Warning: @chzoning admin-owned object!")); } /* everything is okay, do the change */ Zone(thing) = zone; *************** *** 423,434 **** } else { if (zone != NOTHING) { if (Hasprivs(thing)) ! notify(player, T("Warning: @chzoning a privileged player.")); if (Flags(thing) & INHERIT) ! notify(player, T("Warning: @chzoning an TRUST player.")); } } ! notify(player, T("Zone changed.")); } struct af_args { --- 422,437 ---- } else { if (zone != NOTHING) { if (Hasprivs(thing)) ! if (noisy) ! notify(player, T("Warning: @chzoning a privileged player.")); if (Flags(thing) & INHERIT) ! if (noisy) ! notify(player, T("Warning: @chzoning an TRUST player.")); } } ! if (noisy) ! notify(player, T("Zone changed.")); ! return 1; } struct af_args { *** 1_7_5.37/src/predicat.c Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.5 660) --- 1_7_5.44(w)/src/predicat.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.6 660) *************** *** 6,22 **** /* Predicates for testing various conditions */ #include - #ifdef I_STDARG #include - #else - #include - #endif #include - #ifdef I_STRING #include - #else - #include - #endif #ifdef I_SYS_TYPES #include #endif --- 6,14 ---- *************** *** 25,33 **** #else #include #endif - #ifdef I_STDLIB #include - #endif #include "conf.h" #include "externs.h" --- 17,23 ---- *************** *** 46,75 **** #include "mymalloc.h" #include "confmagic.h" ! int forbidden_name _((const char *name)); ! void sstrcat _((char *string, char *app)); ! void do_switch _((dbref player, char *expression, char **argv, ! dbref cause, int first, int notifyme)); ! void do_verb _((dbref player, dbref cause, char *arg1, char **argv)); ! static int grep_util_helper _((dbref player, dbref thing, ! char const *pattern, ATTR *atr, void *args)); ! static int grep_helper _((dbref player, dbref thing, ! char const *pattern, ATTR *atr, void *args)); ! void do_grep _((dbref player, char *obj, char *lookfor, int flag, ! int insensitive)); #ifdef QUOTA static int pay_quota _((dbref, int)); #endif /* QUOTA */ extern PRIV attr_privs[]; - #ifdef I_STDARG char *WIN32_CDECL tprintf(const char *fmt, ...) - #else - char * - tprintf(va_alist) - va_dcl - #endif { /* this is a generic function used to generate a format string */ #ifdef HAS_VSNPRINTF --- 36,58 ---- #include "mymalloc.h" #include "confmagic.h" ! int forbidden_name(const char *name); ! void sstrcat(char *string, char *app); ! void do_switch(dbref player, char *expression, char **argv, ! dbref cause, int first, int notifyme); ! void do_verb(dbref player, dbref cause, char *arg1, char **argv); ! static int grep_util_helper(dbref player, dbref thing, ! char const *pattern, ATTR *atr, void *args); ! static int grep_helper(dbref player, dbref thing, ! char const *pattern, ATTR *atr, void *args); ! void do_grep(dbref player, char *obj, char *lookfor, int flag, int insensitive); #ifdef QUOTA static int pay_quota _((dbref, int)); #endif /* QUOTA */ extern PRIV attr_privs[]; char *WIN32_CDECL tprintf(const char *fmt, ...) { /* this is a generic function used to generate a format string */ #ifdef HAS_VSNPRINTF *************** *** 78,91 **** static char buff[BUFFER_LEN * 3]; /* safety margin */ #endif va_list args; - #ifndef I_STDARG - char *fmt; - va_start(args); - fmt = va_arg(args, char *); - #else va_start(args, fmt); - #endif #ifdef HAS_VSNPRINTF vsnprintf(buff, sizeof buff, fmt, args); --- 61,68 ---- *************** *** 99,112 **** } /* Safer replacement for notify(player, tprintf(fmt, ...)) */ - #ifdef I_STDARG void WIN32_CDECL notify_format(dbref player, const char *fmt, ...) - #else - void - notify_format(va_alist) - va_dcl - #endif { #ifdef HAS_VSNPRINTF char buff[BUFFER_LEN]; --- 76,83 ---- *************** *** 114,129 **** char buff[BUFFER_LEN * 3]; #endif va_list args; ! #ifndef I_STDARG ! dbref player; ! char *fmt; ! ! va_start(args); ! dbref = va_arg(args, dbref); ! fmt = va_arg(args, char *); ! #else va_start(args, fmt); - #endif #ifdef HAS_VSNPRINTF vsnprintf(buff, sizeof buff, fmt, args); --- 85,92 ---- char buff[BUFFER_LEN * 3]; #endif va_list args; ! va_start(args, fmt); #ifdef HAS_VSNPRINTF vsnprintf(buff, sizeof buff, fmt, args); *************** *** 660,666 **** const char *scan, *good; if (!ok_name(name) || forbidden_name(name) || ! strlen(name) >= PLAYER_NAME_LIMIT) return 0; good = PLAYER_NAME_SPACES ? " `$_-.,'" : "`$_-.,'"; --- 623,629 ---- const char *scan, *good; if (!ok_name(name) || forbidden_name(name) || ! strlen(name) >= (Size_t) PLAYER_NAME_LIMIT) return 0; good = PLAYER_NAME_SPACES ? " `$_-.,'" : "`$_-.,'"; *** 1_7_5.37/src/portmsg.c Mon, 22 May 2000 11:21:12 -0500 dunemush (pennmush/b/45_portmsg.c 1.16 660) --- 1_7_5.44(w)/src/portmsg.c Mon, 03 Dec 2001 10:23:41 -0600 dunemush (pennmush/b/45_portmsg.c 1.17 660) *************** *** 55,76 **** #ifdef I_UNISTD #include #endif - #ifdef I_LIMITS #include - #endif #ifdef I_SYS_TYPES #include #endif #include #include #include - #ifdef I_ERRNO #include - #else #ifdef I_SYS_ERRNO #include #endif - #endif #include #include #include --- 55,71 ---- *************** *** 86,96 **** #include "confmagic.h" /* What htons expects */ ! #ifdef CAN_NEWSTYLE ! #define Port_t unsigned short ! #else ! #define Port_t int ! #endif #ifdef HAS_WAITPID #define WAIT_TYPE int --- 81,87 ---- #include "confmagic.h" /* What htons expects */ ! typedef unsigned short Port_t; #ifdef HAS_WAITPID #define WAIT_TYPE int *************** *** 102,110 **** #endif #endif ! static Signal_t wait_on_child _((int sig)); ! static Signal_t lostconn _((int sig)); ! static int how_many_fds _((void)); static Signal_t wait_on_child(sig) --- 93,101 ---- #endif #endif ! static Signal_t wait_on_child(int sig); ! static Signal_t lostconn(int sig); ! static int how_many_fds(void); static Signal_t wait_on_child(sig) *** 1_7_5.37/src/log.c Thu, 31 May 2001 11:20:12 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2 660) --- 1_7_5.44(w)/src/log.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/c/5_log.c 1.10.1.2.1.1 660) *************** *** 7,22 **** #ifdef I_UNISTD #include #endif - #ifdef I_STRING #include - #else - #include - #endif - #ifdef I_STDARG #include - #else - #include - #endif #ifdef I_SYS_TIME #include #else --- 7,14 ---- *************** *** 33,41 **** #include "log.h" #include "confmagic.h" ! char *quick_unparse _((dbref object)); ! void start_log _((FILE ** fp, const char *filename)); ! void end_log _((FILE * fp)); #ifdef macintosh extern void PMConvertPath(char *path); --- 25,33 ---- #include "log.h" #include "confmagic.h" ! char *quick_unparse(dbref object); ! void start_log(FILE ** fp, const char *filename); ! void end_log(FILE * fp); #ifdef macintosh extern void PMConvertPath(char *path); *************** *** 131,145 **** } - #ifdef I_STDARG void WIN32_CDECL do_rawlog(int logtype, const char *fmt, ...) - #else - void - do_rawlog(logtype, va_alist) - int logtype; - va_dcl - #endif { /* take a log type and format list and args, write to appropriate logfile. * log types are defined in log.h --- 123,130 ---- *************** *** 149,162 **** char tbuf1[BUFFER_LEN + 50]; va_list args; FILE *f = NULL; - #ifndef I_STDARG - char *fmt; - - va_start(args); - fmt = va_arg(args, char *); - #else va_start(args, fmt); ! #endif #ifdef HAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); #else --- 134,141 ---- char tbuf1[BUFFER_LEN + 50]; va_list args; FILE *f = NULL; va_start(args, fmt); ! #ifdef HAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); #else *************** *** 203,219 **** fflush(f); } - #ifdef I_STDARG void WIN32_CDECL do_log(int logtype, dbref player, dbref object, const char *fmt, ...) - #else - void - do_log(logtype, player, object, va_alist) - int logtype; - dbref player; - dbref object; - va_dcl - #endif { /* take a log type and format list and args, write to appropriate logfile. * log types are defined in mushdb.h --- 182,189 ---- *************** *** 226,240 **** char tbuf1[BUFFER_LEN + 50]; va_list args; char unp1[BUFFER_LEN], unp2[BUFFER_LEN]; - #ifndef I_STDARG - char *fmt; - va_start(args); - fmt = va_arg(args, char *); - #else va_start(args, fmt); ! #endif ! #ifdef hAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); #else (void) vsprintf(tbuf1, fmt, args); --- 196,205 ---- char tbuf1[BUFFER_LEN + 50]; va_list args; char unp1[BUFFER_LEN], unp2[BUFFER_LEN]; va_start(args, fmt); ! ! #ifdef HAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); #else (void) vsprintf(tbuf1, fmt, args); *** 1_7_5.37/src/info_slave.c Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/c/7_info_slave 1.9.1.2 660) --- 1_7_5.44(w)/src/info_slave.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/c/7_info_slave 1.9.1.3 660) *************** *** 7,20 **** #endif #include - #ifdef I_STDARG - #include - #else - #include - #endif - #ifdef I_STDLIB #include - #endif #ifdef I_MEMORY #include #endif --- 7,13 ---- *************** *** 29,39 **** #endif #include #include - #ifdef I_STRING #include - #else - #include - #endif #ifdef I_UNISTD #include #endif --- 22,28 ---- *** 1_7_5.37/src/ident.c Fri, 26 Oct 2001 10:44:14 -0500 dunemush (pennmush/c/8_ident.c 1.19.1.4.1.3 660) --- 1_7_5.44(w)/src/ident.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/c/8_ident.c 1.19.1.4.1.4 660) *************** *** 292,304 **** ** ** Author: Peter Eriksson */ ! static int id_close ! #ifdef CAN_NEWSTYLE ! (ident_t * id) ! #else ! (id) ! ident_t *id; ! #endif { int res; --- 292,299 ---- ** ** Author: Peter Eriksson */ ! static int ! id_close(ident_t * id) { int res; *** 1_7_5.37/src/game.c Fri, 26 Oct 2001 10:44:14 -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.3 660) --- 1_7_5.44(w)/src/game.c Mon, 03 Dec 2001 10:23:40 -0600 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.4 660) *************** *** 5,15 **** #include #include - #ifdef I_STRING #include - #else - #include - #endif #include #ifdef I_SYS_WAIT #include --- 5,11 ---- *************** *** 21,26 **** --- 17,24 ---- #endif #ifdef WIN32 #include + #include + #undef OPAQUE /* Clashes with flags.h */ void Win32MUSH_setup _((void)); #endif #ifdef I_SYS_TYPES *************** *** 29,37 **** #ifdef HAS_GETRUSAGE #include #endif - #ifdef I_STDLIB #include - #endif #ifdef I_UNISTD #include #endif --- 27,33 ---- *************** *** 1113,1130 **** } /* match a list of things */ - #ifdef CAN_NEWSTYLE int list_check(dbref thing, dbref player, char type, char end, char *str, int just_match) - #else - int - list_check(thing, player, type, end, str, just_match) - dbref thing, player; - char type, end; - char *str; - int just_match; - #endif { int match = 0; --- 1109,1117 ---- *** 1_7_5.37/src/funmath.c Tue, 20 Mar 2001 12:21:04 -0600 dunemush (pennmush/c/15_funmath.c 1.39 660) --- 1_7_5.44(w)/src/funmath.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/c/15_funmath.c 1.40 660) *************** *** 3,13 **** #include "config.h" #include - #ifdef I_STRING #include - #else - #include - #endif #include #include "conf.h" #include "externs.h" --- 3,9 ---- *************** *** 20,46 **** #pragma warning( disable : 4761) /* NJG: disable warning re conversion */ #endif ! static void do_spellnum ! _((char *num, unsigned int len, char **buff, char ***bp)); - #ifdef CAN_NEWSTYLE #define MATH_FUNC(func) static void func(char **ptr, int nptr, char *buff, char **bp) - #else - #define MATH_FUNC(func) static void func(ptr, nptr, buff, bp) \ - char **ptr, *buff, **bp; \ - int nptr; - #endif ! #define MATH_PROTO(func) static void func _((char **ptr, int nptr, char *buff, char **bp)); HASHTAB htab_math; typedef struct { const char *name; ! void (*func) _((char **, int, char *, char **)); } MATH; ! static MATH *math_hash_lookup _((char *)); MATH_PROTO(math_add); MATH_PROTO(math_sub); --- 16,35 ---- #pragma warning( disable : 4761) /* NJG: disable warning re conversion */ #endif ! static void do_spellnum(char *num, unsigned int len, char **buff, char ***bp); #define MATH_FUNC(func) static void func(char **ptr, int nptr, char *buff, char **bp) ! #define MATH_PROTO(func) static void func (char **ptr, int nptr, char *buff, char **bp); HASHTAB htab_math; typedef struct { const char *name; ! void (*func) (char **, int, char *, char **); } MATH; ! static MATH *math_hash_lookup(char *); MATH_PROTO(math_add); MATH_PROTO(math_sub); *************** *** 1869,1884 **** safe_chr('0', buff, bp); } ! int nval_sort _((const void *, const void *)); - #ifdef CAN_NEWSTYLE int nval_sort(const void *a, const void *b) - #else - int - nval_sort(a, b) - const void *a, *b; - #endif { const NVAL *x = a, *y = b; const double epsilon = pow(10, -FLOAT_PRECISION); --- 1858,1867 ---- safe_chr('0', buff, bp); } ! int nval_sort(const void *, const void *); int nval_sort(const void *a, const void *b) { const NVAL *x = a, *y = b; const double epsilon = pow(10, -FLOAT_PRECISION); *************** *** 1886,1902 **** return eq ? 0 : (*x > *y ? 1 : -1); } ! NVAL find_median _((NVAL *, int)); - #ifdef CAN_NEWSTYLE NVAL find_median(NVAL *numbers, int nargs) - #else - NVAL - find_median(numbers, nargs) - NVAL *numbers; - int nargs; - #endif { if (nargs == 0) return 0; --- 1869,1878 ---- return eq ? 0 : (*x > *y ? 1 : -1); } ! NVAL find_median(NVAL *, int); NVAL find_median(NVAL *numbers, int nargs) { if (nargs == 0) return 0; *************** *** 2030,2048 **** }; static MATH * ! math_hash_lookup(name) ! char *name; { return (MATH *) hashfind(strupper(name), &htab_math); } ! void math_hash_insert _((const char *, MATH *)); ! void init_math_hashtab _((void)); void ! math_hash_insert(name, func) ! const char *name; ! MATH *func; { hashadd(name, (void *) func, &htab_math); } --- 2006,2021 ---- }; static MATH * ! math_hash_lookup(char *name) { return (MATH *) hashfind(strupper(name), &htab_math); } ! void math_hash_insert(const char *, MATH *); ! void init_math_hashtab(void); void ! math_hash_insert(const char *name, MATH *func) { hashadd(name, (void *) func, &htab_math); } *** 1_7_5.37/src/funlist.c Thu, 08 Nov 2001 14:51:56 -0600 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.5 660) --- 1_7_5.44(w)/src/funlist.c Mon, 03 Dec 2001 10:23:40 -0600 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.6 660) *************** *** 1,11 **** #include "copyrite.h" #include "config.h" - #ifdef I_STRING #include - #else - #include - #endif #include #include "conf.h" #include "case.h" --- 1,7 ---- *************** *** 56,70 **** int inum_limit = 0; extern const unsigned char *tables; - #ifdef CAN_NEWSTYLE static char * next_token(char *str, char sep) - #else - static char * - next_token(str, sep) - char *str; - char sep; - #endif { /* move pointer to start of the next token */ --- 52,59 ---- *************** *** 80,96 **** return str; } - #ifdef CAN_NEWSTYLE int list2arr(char *r[], int max, char *list, char sep) - #else - int - list2arr(r, max, list, sep) - char *r[]; - int max; - char *list; - char sep; - #endif { /* chops up a list of words into an array of words. The list is * destructively modified. --- 69,76 ---- *************** *** 105,122 **** return i; } - #ifdef CAN_NEWSTYLE static void arr2list(char *r[], int max, char *list, char **lp, char *sep) - #else - static void - arr2list(r, max, list, lp, sep) - char *r[]; - int max; - char *list; - char **lp; - char *sep; - #endif { int i; --- 85,92 ---- *** 1_7_5.37/src/fundb.c Fri, 26 Oct 2001 10:44:14 -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.3 660) --- 1_7_5.44(w)/src/fundb.c Mon, 03 Dec 2001 10:23:40 -0600 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.4 660) *************** *** 1129,1135 **** return; } #ifdef FUNCTION_SIDE_EFFECTS ! do_chzone(executor, args[0], args[1]); #else safe_str(T(e_disabled), buff, bp); return; --- 1129,1135 ---- return; } #ifdef FUNCTION_SIDE_EFFECTS ! (void) do_chzone(executor, args[0], args[1], 1); #else safe_str(T(e_disabled), buff, bp); return; *** 1_7_5.37/src/function.c Tue, 13 Nov 2001 23:23:33 -0600 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.9 660) --- 1_7_5.44(w)/src/function.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.10 660) *************** *** 138,150 **** struct fun_tab { const char *name; ! #ifdef CAN_TAKE_ARGS_IN_FP ! void (*fun) _((char *buff, char **bp, int nargs, char *args[], ! dbref executor, dbref caller, dbref enactor, ! char const *called_as, PE_Info * pe_info)); ! #else ! void (*fun) (); ! #endif int minargs; int maxargs; int flags; --- 138,144 ---- struct fun_tab { const char *name; ! function_func fun; int minargs; int maxargs; int flags; *************** *** 631,648 **** } void ! function_add(name, fun, minargs, maxargs, ftype) ! const char *name; ! #ifdef CAN_TAKE_ARGS_IN_FP ! void (*fun) _((char *buff, char **bp, int nargs, char *args[], ! dbref executor, dbref caller, dbref enactor, ! char const *called_as, PE_Info * pe_info)); ! #else ! void (*fun) (); ! #endif ! int minargs; ! int maxargs; ! int ftype; { FUN *fp; fp = (FUN *) mush_malloc(sizeof(FUN), "function"); --- 625,632 ---- } void ! function_add(const char *name, function_func fun, int minargs, int maxargs, ! int ftype) { FUN *fp; fp = (FUN *) mush_malloc(sizeof(FUN), "function"); *** 1_7_5.37/src/flags.c Thu, 25 Oct 2001 15:04:15 -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.3 660) --- 1_7_5.44(w)/src/flags.c Mon, 03 Dec 2001 10:23:39 -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.4 660) *************** *** 8,21 **** #else #include #endif - #ifdef I_STRING #include - #else - #include - #endif - #ifdef I_STDLIB #include - #endif #include "conf.h" #include "mushdb.h" --- 8,15 ---- *************** *** 777,792 **** return fbuf; } - #ifdef CAN_NEWSTYLE static FLAG * letter_to_flagptr(char c, int type, int *toggle) - #else - static FLAG * - letter_to_flagptr(c, type, toggle) - char c; - int type; - int *toggle; - #endif { /* convert letter to flag */ --- 771,778 ---- *** 1_7_5.37/src/extchat.c Fri, 09 Nov 2001 13:25:20 -0600 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.3 660) --- 1_7_5.44(w)/src/extchat.c Mon, 03 Dec 2001 10:23:39 -0600 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 660) *************** *** 1439,1447 **** if (!name || !*name) { p = Chanlist(player); ! /* Javelin: I set it so if you leave off the channel name. ! * it doesn't list the channels. If you don't like, ! * get rid of it here. -DTC */ silent = 1; notify(player, T("Done.")); } else { --- 1439,1448 ---- if (!name || !*name) { p = Chanlist(player); ! if (!p) { ! notify(player, T("You are not on any channels.")); ! return; ! } silent = 1; notify(player, T("Done.")); } else { *************** *** 1573,1583 **** char cleanname[CHAN_NAME_LEN]; const char thirtyblanks[31] = " "; char blanks[31]; if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%cSAMP%c", TAG_START, TAG_END)); ! notify_format(player, "%-*s %-5s %8s %-16s %-8s", ! CHAN_NAME_LEN, "Name", "Users", "Msgs", T("Chan Type"), "Status"); for (c = channels; c; c = c->next) { strcpy(cleanname, remove_markup(ChanName(c), NULL)); --- 1574,1584 ---- char cleanname[CHAN_NAME_LEN]; const char thirtyblanks[31] = " "; char blanks[31]; + int numblanks; if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%cSAMP%c", TAG_START, TAG_END)); ! notify_format(player, "%-30s %-5s %8s %-16s %-8s", "Name", "Users", "Msgs", T("Chan Type"), "Status"); for (c = channels; c; c = c->next) { strcpy(cleanname, remove_markup(ChanName(c), NULL)); *************** *** 1590,1597 **** TAG_START, TAG_END); else sprintf(numusers, "%5ld", ChanNumUsers(c)); ! strcpy(blanks, thirtyblanks); ! blanks[strlen(ChanName(c)) - strlen(cleanname)] = '\0'; notify_format(player, "%-30s%s %s %8ld [%c%c%c%c%c%c%c %c%c%c%c%c%c] [%-3s %c%c]", ChanName(c), blanks, numusers, ChanNumMsgs(c), --- 1591,1603 ---- TAG_START, TAG_END); else sprintf(numusers, "%5ld", ChanNumUsers(c)); ! numblanks = strlen(ChanName(c)) - strlen(cleanname); ! if (numblanks > 0 && numblanks < 31) { ! strcpy(blanks, thirtyblanks); ! blanks[numblanks] = '\0'; ! } else { ! blanks[0] = '\0'; ! } notify_format(player, "%-30s%s %s %8ld [%c%c%c%c%c%c%c %c%c%c%c%c%c] [%-3s %c%c]", ChanName(c), blanks, numusers, ChanNumMsgs(c), *** 1_7_5.37/src/destroy.c Thu, 25 Oct 2001 15:04:15 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.4 660) --- 1_7_5.44(w)/src/destroy.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.5 660) *************** *** 792,798 **** { dbref i; ATTR *atemp; ! char alias[PLAYER_NAME_LIMIT]; /* Clear out mail. */ #ifdef USE_MAILER --- 792,798 ---- { dbref i; ATTR *atemp; ! char alias[BUFFER_LEN + 1]; /* Clear out mail. */ #ifdef USE_MAILER *** 1_7_5.37/src/db.c Fri, 11 May 2001 18:11:50 -0500 dunemush (pennmush/c/25_db.c 1.27 660) --- 1_7_5.44(w)/src/db.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/25_db.c 1.30 660) *************** *** 5,23 **** #include #include - #ifdef I_STRING #include - #else - #include - #endif #ifdef I_SYS_TIME #include #else #include #endif - #ifdef I_STDLIB #include - #endif #ifdef I_SETJMP #include #endif --- 5,17 ---- *************** *** 28,36 **** #ifdef MEM_CHECK #include "memcheck.h" #endif - #ifdef ADD_POWERS - #include "convdb.c" - #endif #include "mymalloc.h" #include "game.h" #include "flags.h" --- 22,27 ---- *************** *** 52,59 **** #define OUTPUT(fun) fun #endif - #define QUOTE_STRINGS - #define MAYBE_GET(f,x) \ (indb_flags & (x)) ? getref(f) : 0 --- 43,48 ---- *************** *** 93,99 **** StrTree object_names; extern StrTree atr_names; ! void init_names _((void)); extern struct db_stat_info current_state; --- 82,88 ---- StrTree object_names; extern StrTree atr_names; ! void init_names(void); extern struct db_stat_info current_state; *************** *** 245,251 **** OUTPUT(fprintf(f, "%ld\n", ref)); } - #ifdef QUOTE_STRINGS void putstring(f, s) FILE *f; --- 234,239 ---- *************** *** 266,283 **** OUTPUT(putc('"', f)); OUTPUT(putc('\n', f)); } - #else /* !QUOTE_STRINGS */ - void - putstring(f, s) - FILE *f; - const char *s; - { - if (s) { - OUTPUT(fputs(s, f)); - } - OUTPUT(putc('\n', f)); - } - #endif /* !QUOTE_STRINGS */ #ifndef DUMP_OLD_LOCKS --- 254,259 ---- *************** *** 514,520 **** case BOOLEXP_CONST: OUTPUT(fprintf(f, "%d", b->thing)); break; - #ifdef QUOTE_STRINGS case BOOLEXP_ATR: putstring(f, b->data.atr_lock->name); OUTPUT(putc(':', f)); --- 490,495 ---- *************** *** 525,540 **** OUTPUT(putc('/', f)); putstring(f, uncompress(b->data.atr_lock->text)); break; - #else /* !QUOTE_STRINGS */ - case BOOLEXP_ATR: - OUTPUT(fprintf - (f, "%s:%s", b->atr_lock->name, uncompress(b->atr_lock->text))); - break; - case BOOLEXP_EVAL: - OUTPUT(fprintf - (f, "%s/%s", b->atr_lock->name, uncompress(b->atr_lock->text))); - break; - #endif /* !QUOTE_STRINGS */ default: break; } --- 500,505 ---- *************** *** 586,594 **** putref(f, Pennies(i)); putref(f, o->flags); putref(f, o->toggles); - #ifndef DELETE_POWERS putref(f, o->powers); - #endif /* Original chat system wrote chat channels to the db here. * That's no longer done, they're written to chatdb */ --- 551,557 ---- *************** *** 645,659 **** #ifdef CREATION_TIMES dbflag += DBF_CREATION_TIMES; #endif - #ifndef ADD_POWERS - #ifdef DELETE_POWERS - dbflag += DBF_NO_POWERS; - #endif - #endif dbflag += DBF_SPIFFY_LOCKS; - #ifdef QUOTE_STRINGS dbflag += DBF_NEW_STRINGS; - #endif dbflag += DBF_TYPE_GARBAGE; dbflag += DBF_SPLIT_IMMORTAL; dbflag += DBF_NO_TEMPLE; --- 608,615 ---- *************** *** 756,773 **** lastp = '\0'; for (p = tbuf1; *p; p++) { if (!isprint(*p)) { - #ifdef QUOTE_STRINGS if (!isspace(*p)) { *p = '!'; err = 1; } - #else /* !QUOTE_STRINGS */ - /* If we've got a \n that's not preceded by a \r, stomp it. */ - if (!isspace(*p) || ((*p == '\n') && (lastp != '\r'))) { - *p = '!'; - err = 1; - } - #endif /* !QUOTE_STRINGS */ } lastp = *p; } --- 712,721 ---- *************** *** 793,801 **** } dbref ! db_paranoid_write(f, flag) ! FILE *f; ! int flag; /* 1 = debug, 0 = normal */ { dbref i; int dbflag; --- 741,748 ---- } dbref ! db_paranoid_write(FILE * f, int flag) ! /* flag: 1 = debug, 0 = normal */ { dbref i; int dbflag; *************** *** 811,825 **** #ifdef CREATION_TIMES dbflag += DBF_CREATION_TIMES; #endif - #ifndef ADD_POWERS - #ifdef DELETE_POWERS - dbflag += DBF_NO_POWERS; - #endif - #endif dbflag += DBF_SPIFFY_LOCKS; - #ifdef QUOTE_STRINGS dbflag += DBF_NEW_STRINGS; - #endif dbflag += DBF_TYPE_GARBAGE; dbflag += DBF_SPLIT_IMMORTAL; dbflag += DBF_NO_TEMPLE; --- 758,765 ---- *************** *** 868,878 **** return (atol(buf)); } - #ifdef QUOTE_STRINGS const char * ! getstring_noalloc(f) ! FILE *f; { static char buf[BUFFER_LEN]; char *p; --- 808,816 ---- return (atol(buf)); } const char * ! getstring_noalloc(FILE * f) { static char buf[BUFFER_LEN]; char *p; *************** *** 880,886 **** p = buf; c = fgetc(f); ! if (!(indb_flags & DBF_NEW_STRINGS) || (c != '"')) { for (;;) { if ((c == '\0') || (c == EOF) || ((c == '\n') && ((p == buf) || (p[-1] != '\r')))) { --- 818,824 ---- p = buf; c = fgetc(f); ! if (c != '"') { for (;;) { if ((c == '\0') || (c == EOF) || ((c == '\n') && ((p == buf) || (p[-1] != '\r')))) { *************** *** 909,986 **** } } } - #else /* !QUOTE_STRINGS */ - #ifndef OLD_NEWLINES - const char * - getstring_noalloc(f) - FILE *f; - { - static char buf[BUFFER_LEN]; - char *p; - int c, lastc; - int starting_quote = 0; - - p = buf; - c = '\0'; - - if (indb_flags & DBF_NEW_STRINGS) { - c = fgetc(f); /* Get the initial quote */ - if (c == '"') - starting_quote = 1; - else - ungetc(c, f); - } - for (;;) { - - lastc = c; - c = fgetc(f); - - /* if EOF or null, return */ - if ((c == '\0') || (c == EOF)) { - *p = '\0'; - return buf; - } - /* if it's a newline, return if prior char is not a carriage return. - * "\r\n" sequences are created by using the %r substitution, and - * thus may occur in the middle of a buffer. - */ - if (starting_quote) { - if (c == '"') { - fgetc(f); /* Get the newline */ - *p = '\0'; - return buf; - } else if (c == '\\') { - c = fgetc(f); - } - } else { - if ((c == '\n') && (lastc != '\r')) { - *p = '\0'; - return buf; - } - } - /* copy it in */ - safe_chr(c, buf, &p); - } - } - - #else - const char * - getstring_noalloc(f) - FILE *f; - { - static char buf[2 * BUFFER_LEN]; - char *p; - fgets(buf, sizeof(buf), f); - for (p = buf; *p; p++) { - if (*p == '\n') { - *p = '\0'; - break; - } - } - return buf; - } - #endif /* OLD_NEWLINES */ - #endif /* !QUOTE_STRINGS */ static struct boolexp * getboolexp1(FILE * f, const char *type) --- 847,852 ---- *************** *** 1073,1079 **** ungetc(c, f); return TRUE_BOOLEXP; /* break */ - #ifdef QUOTE_STRINGS case '"': /* Either a BOOLEXP_ATR or a BOOLEXP_EVAL */ ungetc(c, f); --- 939,944 ---- *************** *** 1087,1093 **** b->type = (c == ':') ? BOOLEXP_ATR : BOOLEXP_EVAL; b->data.atr_lock = alloc_atr(tbuf1, (char *) getstring_noalloc(f)); return b; - #endif default: /* can be either a dbref or : seperated string */ ungetc(c, f); --- 952,957 ---- *************** *** 1101,1129 **** b->thing = b->thing * 10 + c - '0'; c = getc(f); } ! switch (c) { ! case ':': /* old style boolexp lock */ ! { ! char *p; ! ! for (p = tbuf1; ! ((c = getc(f)) != EOF) && (c != '\n') && (c != ')'); *p++ = c) ; ! *p = '\0'; ! if (c == EOF) ! goto error; ! b->data.atr_lock = alloc_atr(convert_atr(b->thing), tbuf1); ! b->thing = 0; ! b->type = BOOLEXP_ATR; ! /* this is only needed because of the braindeath of the previous ! * version of atrlocks.. bleah. ! */ ! if (c == '\n') ! return (b); ! } ! default: ! ungetc(c, f); ! break; } return (b); } else { /* we indulge in a bit of a kludge. We either have a colon --- 965,976 ---- b->thing = b->thing * 10 + c - '0'; c = getc(f); } ! ! if (c == ':') { /* old style boolexp lock */ ! do_rawlog(LT_ERR, T("ERROR: Old-style @lock on object #%d\n"), errobj); ! return TRUE_BOOLEXP; } + ungetc(c, f); return (b); } else { /* we indulge in a bit of a kludge. We either have a colon *************** *** 1263,1271 **** /* read attribute list */ int ! get_list(f, i) ! FILE *f; ! dbref i; { int c; char *p, *q; --- 1110,1116 ---- /* read attribute list */ int ! get_list(FILE * f, dbref i) { int c; char *p, *q; *************** *** 1273,1282 **** int flags; int count = 0; - #ifdef OLD_NEWLINES - char nextc; - #endif /* OLD_NEWLINES */ - List(i) = NULL; tbuf1[0] = '\0'; while (1) --- 1118,1123 ---- *************** *** 1319,1351 **** * parameter, and thus no flags), since this eliminates 'visual' * attributes (which, if not built-in attrs, have a flag val of 0.) */ - #ifdef OLD_NEWLINES - /* hack to check if there's an unexpected '\n' that got in */ - nextc = getc(f); - if ((nextc != ']') && (nextc != '>') && (nextc != '<') && (nextc != '!')) { - /* we have a problem. print error */ - do_rawlog(LT_ERR, - T - ("** WARNING ** Hard newline in attribute %s on object #%d"), - tbuf1, i); - /* throw out everything until next good attrib or object. - * we can tell a good attrib or object by looking for a \n - * followed by a ], >, <, or !. Otherwise, we can be "spoofed" - */ - do { - while ((nextc = getc(f)) != '\n') ; - nextc = getc(f); /* go past EOL */ - } while ((nextc != ']') && (nextc != '>') && (nextc != '<') && - (nextc != '!')); - } - /* we've eaten a character, so go back. */ - ungetc(nextc, f); - #endif /* OLD_NEWLINES */ break; ! case '>': /* old style attribs, read # then value */ ! strcpy(tbuf1, convert_atr(getref(f))); ! atr_new_add(i, tbuf1, (char *) getstring_noalloc(f), Owner(i), NOTHING); ! count++; break; case '<': /* end of list */ if ('\n' != getc(f)) { --- 1160,1169 ---- * parameter, and thus no flags), since this eliminates 'visual' * attributes (which, if not built-in attrs, have a flag val of 0.) */ break; ! case '>': /* old style attribs, die noisily */ ! do_rawlog(LT_ERR, T("ERROR: old-style attribute format in object %d"), i); ! return -1; break; case '<': /* end of list */ if ('\n' != getc(f)) { *************** *** 1375,1392 **** dbref ! db_read(f) ! FILE *f; { int c; dbref i; struct object *o; const char *end; - #ifdef ADD_POWERS - int flags, toggles, powers; - #endif int temp = 0; time_t temp_time = 0; loading_db = 1; --- 1193,1208 ---- dbref ! db_read(FILE * f) { int c; dbref i; struct object *o; const char *end; int temp = 0; time_t temp_time = 0; + int minimum_flags = + DBF_NEW_STRINGS | DBF_TYPE_GARBAGE | DBF_SPLIT_IMMORTAL | DBF_NO_TEMPLE; loading_db = 1; *************** *** 1410,1434 **** return -1; } indb_flags = ((getref(f) - 2) / 256) - 5; if (!(indb_flags & (DBF_NEW_LOCKS | DBF_SPIFFY_LOCKS))) { ! do_rawlog(LT_ERR, T("ERROR: old @lock style database.")); ! /* if you want to read in an old-style database, use an earlier ! * patchlevel to upgrade. ! */ return -1; } break; /* old fashioned database */ case '#': do_rawlog(LT_ERR, T("ERROR: old style database.")); - /* if you want to read in an old-style database, use an earlier - * patchlevel to upgrade. - */ return -1; break; /* new database */ case '!': /* non-zone oriented database */ - case '&': /* zone oriented database */ /* make space */ i = getref(f); db_grow(i + 1); --- 1226,1252 ---- return -1; } indb_flags = ((getref(f) - 2) / 256) - 5; + /* if you want to read in an old-style database, use an earlier + * patchlevel to upgrade. + */ + if (((indb_flags & minimum_flags) != minimum_flags) || + (indb_flags & DBF_NO_POWERS)) { + do_rawlog(LT_ERR, T("ERROR: Old database without required dbflags.")); + return -1; + } if (!(indb_flags & (DBF_NEW_LOCKS | DBF_SPIFFY_LOCKS))) { ! do_rawlog(LT_ERR, T("Error: Unsupported @lock format in database.")); return -1; } break; /* old fashioned database */ case '#': + case '&': /* zone oriented database */ do_rawlog(LT_ERR, T("ERROR: old style database.")); return -1; break; /* new database */ case '!': /* non-zone oriented database */ /* make space */ i = getref(f); db_grow(i + 1); *************** *** 1436,1443 **** o = db + i; set_name(i, getstring_noalloc(f)); o->location = getref(f); - if (c == '&') /* Eat up useless zone number */ - getref(f); o->contents = getref(f); o->exits = getref(f); o->next = getref(f); --- 1254,1259 ---- *************** *** 1473,1480 **** break; } ! if (IsPlayer(i) && (strlen(o->name) > PLAYER_NAME_LIMIT)) { ! char buff[PLAYER_NAME_LIMIT + 1]; /* The name plus a NUL */ strncpy(buff, o->name, PLAYER_NAME_LIMIT); buff[PLAYER_NAME_LIMIT] = '\0'; set_name(i, buff); --- 1289,1296 ---- break; } ! if (IsPlayer(i) && (strlen(o->name) > (Size_t) PLAYER_NAME_LIMIT)) { ! char buff[BUFFER_LEN + 1]; /* The name plus a NUL */ strncpy(buff, o->name, PLAYER_NAME_LIMIT); buff[PLAYER_NAME_LIMIT] = '\0'; set_name(i, buff); *************** *** 1494,1513 **** if (!(indb_flags & DBF_VALUE_IS_COST) && IsThing(i)) s_Pennies(i, (Pennies(i) + 1) * 5); o->toggles = getref(f); ! if (!(indb_flags & DBF_NO_POWERS)) ! o->powers = getref(f); ! else ! o->powers = 0; ! /* Split the immortal power into NO_PAY, NO_QUOTA, and UNKILLABLE ! * Remove the CAN_DEBUG power, too. ! */ ! if (!(indb_flags & DBF_SPLIT_IMMORTAL)) { ! o->powers &= ~CAN_DEBUG; ! if (o->powers & IMMORTAL) { ! o->powers &= ~IMMORTAL; ! o->powers |= NO_PAY | NO_QUOTA | UNKILLABLE; ! } ! } /* If we've got a variable exit predating the link_anywhere power, * give it the link_anywhere power now. */ --- 1310,1316 ---- if (!(indb_flags & DBF_VALUE_IS_COST) && IsThing(i)) s_Pennies(i, (Pennies(i) + 1) * 5); o->toggles = getref(f); ! o->powers = getref(f); /* If we've got a variable exit predating the link_anywhere power, * give it the link_anywhere power now. */ *************** *** 1521,1538 **** o->flags &= ~STARTUP; o->flags &= ~ACCESSED; } - /* Munge the representation of Garbage objects. */ - if (!(indb_flags & DBF_TYPE_GARBAGE)) { - if ((o->flags & (TYPE_THING | GOING)) == (TYPE_THING | GOING)) { - /* Old-style garbage object. Convert to new-style. */ - o->flags = TYPE_GARBAGE; - } - } - /* Remove the TEMPLE flag */ - if (!(indb_flags & DBF_NO_TEMPLE)) { - if ((o->flags & TYPE_MASK) == TYPE_ROOM) - o->toggles &= ~ROOM_TEMPLE; - } /* Clear the GOING flags. If it was scheduled for destruction * when the db was saved, it gets a reprieve. --- 1324,1329 ---- *************** *** 1585,1593 **** if (IsPlayer(i)) { add_player(i, NULL); Toggles(i) &= ~PLAYER_CONNECT; - #ifdef ADD_POWERS - Flags(i) &= ~0x200; /* zap old connect flag, too */ - #endif } #ifdef LOCAL_DATA o->local_data = NULL; --- 1376,1381 ---- *** 1_7_5.37/src/csrimalloc.c Tue, 15 May 2001 15:59:50 -0500 dunemush (pennmush/c/26_csrimalloc 1.23 660) --- 1_7_5.44(w)/src/csrimalloc.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/26_csrimalloc 1.24 660) *************** *** 2909,2919 **** void __spscan(f, n, q) - #ifdef CAN_TAKE_ARGS_IN_FP REGISTER void (*f) (SPBLK *); - #else - REGISTER void (*f) (); - #endif REGISTER SPBLK *n; REGISTER SPTREE *q; { --- 2909,2915 ---- *** 1_7_5.37/src/conf.c Thu, 08 Nov 2001 18:35:57 -0600 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.5 660) --- 1_7_5.44(w)/src/conf.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.6 660) *************** *** 300,305 **** --- 300,308 ---- {"function_invocation_limit", cf_int, &options.func_invk_lim, 100000, 0, "limits"} , + {"player_name_len", cf_int, &options.player_name_len, BUFFER_LEN, 0, + "limits"} + , #ifdef CHAT_SYSTEM {"max_channels", cf_int, &options.max_channels, 1000, 0, "chat"} *************** *** 896,901 **** --- 899,905 ---- options.dbck_interval = 599; options.max_attrcount = 2048; options.float_precision = 6; + options.player_name_len = 16; } /* Limit how many files we can nest */ *** 1_7_5.37/src/command.c Fri, 09 Nov 2001 13:25:20 -0600 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.3 660) --- 1_7_5.44(w)/src/command.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.4 660) *************** *** 401,421 **** } COMMAND_INFO * ! command_add(name, type, flags, toggles, powers, sw, func) ! const char *name; ! int type; ! int flags; ! int toggles; ! int powers; ! switch_mask *sw; ! #ifdef CAN_TAKE_ARGS_IN_FP ! void (*func) ! _((COMMAND_INFO *cmd, dbref player, dbref cause, switch_mask sw, ! char *raw, char *switches, char *args_raw, char *arg_left, ! char *args_left[MAX_ARG], char *arg_right, char *args_right[MAX_ARG])); ! #else ! void (*func) (); ! #endif { COMMAND_INFO *cmd; cmd = (COMMAND_INFO *) mush_malloc(sizeof(COMMAND_INFO), "command"); --- 401,408 ---- } COMMAND_INFO * ! command_add(const char *name, int type, int flags, int toggles, int powers, ! switch_mask *sw, command_func func) { COMMAND_INFO *cmd; cmd = (COMMAND_INFO *) mush_malloc(sizeof(COMMAND_INFO), "command"); *************** *** 445,465 **** } COMMAND_INFO * ! command_modify(name, type, flags, toggles, powers, sw, func) ! const char *name; ! int type; ! int flags; ! int toggles; ! int powers; ! switch_mask *sw; ! #ifdef CAN_TAKE_ARGS_IN_FP ! void (*func) ! _((COMMAND_INFO *cmd, dbref player, dbref cause, switch_mask sw, ! char *raw, char *switches, char *args_raw, char *arg_left, ! char *args_left[MAX_ARG], char *arg_right, char *args_right[MAX_ARG])); ! #else ! void (*func) (); ! #endif { COMMAND_INFO *cmd; cmd = command_find(name); --- 432,439 ---- } COMMAND_INFO * ! command_modify(const char *name, int type, int flags, int toggles, int powers, ! switch_mask *sw, command_func func) { COMMAND_INFO *cmd; cmd = command_find(name); *** 1_7_5.37/src/cmds.c Fri, 09 Nov 2001 13:25:20 -0600 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.3 660) --- 1_7_5.44(w)/src/cmds.c Mon, 03 Dec 2001 10:23:39 -0600 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.4 660) *************** *** 170,176 **** } COMMAND (cmd_chzone) { ! do_chzone(player, arg_left, arg_right); } COMMAND (cmd_config) { --- 170,176 ---- } COMMAND (cmd_chzone) { ! (void) do_chzone(player, arg_left, arg_right, 1); } COMMAND (cmd_config) { *** 1_7_5.37/src/bsd.c Thu, 08 Nov 2001 14:51:56 -0600 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.5 660) --- 1_7_5.44(w)/src/bsd.c Mon, 03 Dec 2001 10:23:39 -0600 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.8 660) *************** *** 4,14 **** #include "config.h" #include - #ifdef I_STDARG #include - #else - #include - #endif #ifdef I_MEMORY #include #endif --- 4,10 ---- *************** *** 46,65 **** #include #endif #endif /* WIN32 */ - #ifdef I_TIME #include - #endif #ifdef I_SYS_WAIT #include #endif #include #include #include - #ifdef I_STRING #include - #else - #include - #endif #ifdef I_SYS_SELECT #include #endif --- 42,55 ---- *************** *** 69,83 **** #ifdef HAS_GETRLIMIT #include #endif - #ifdef I_LIMITS #include - #endif #ifdef I_FLOATINGPOINT #include #endif - #ifdef I_LOCALE #include - #endif #ifdef __APPLE__ #define LC_MESSAGES 6 #define AUTORESTART --- 59,69 ---- *************** *** 1501,1518 **** void notify_anything(speaker, func, fdata, nsfunc, flags, message) dbref speaker; ! #ifdef CAN_TAKE_ARGS_IN_FP ! dbref (*func) _((dbref current, void *data)); ! #else ! dbref (*func) (); ! #endif void *fdata; - #ifdef CAN_TAKE_ARGS_IN_FP char *(*nsfunc) ! _((dbref speaker, dbref (*func) (dbref, void *), void *fdata, int para)); ! #else ! char *(*nsfunc) (); ! #endif int flags; const char *message; { --- 1487,1496 ---- void notify_anything(speaker, func, fdata, nsfunc, flags, message) dbref speaker; ! dbref (*func) (dbref current, void *data); void *fdata; char *(*nsfunc) ! (dbref speaker, dbref (*func) (dbref, void *), void *fdata, int para); int flags; const char *message; { *************** *** 1814,1831 **** notify_anything(GOD, na_one, (void *) player, NULL, NA_NOLISTEN, msg); } - #ifdef I_STDARG void WIN32_CDECL flag_broadcast(object_flag_type inflags, object_flag_type intoggles, const char *fmt, ...) - #else - void - flag_broadcast(inflags, intoggles, va_alist) - object_flag_type inflags; - object_flag_type intoggles; - va_dcl - #endif /* I_STDARG */ { /* takes flag/toggle masks, format string, and format args, and notifies * all connected players with that flag mask of something. --- 1792,1801 ---- *************** *** 1840,1853 **** va_list args; char tbuf1[BUFFER_LEN]; DESC *d; - #ifndef I_STDARG - char *fmt; - va_start(args); - fmt = va_arg(args, char *); - #else va_start(args, fmt); - #endif /* I_STDARG */ #ifdef HAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); --- 1810,1817 ---- *************** *** 1978,1991 **** return msec_add(last, nslices * COMMAND_TIME_MSEC); } - #ifdef CAN_NEWSTYLE void shovechars(Port_t port) - #else - void - shovechars(port) - Port_t port; - #endif { /* this is the main game loop */ --- 1942,1949 ---- *************** *** 4163,4183 **** if (poll_msg[0] == '\0') strcpy(poll_msg, "Doing"); if (ShowAnsi(call_by->player)) ! sprintf(tbuf2, "%s %s %s %s%s\r\n", T("Player Name"), T("On For"), T("Idle"), poll_msg, ANSI_NORMAL); else ! sprintf(tbuf2, "%s %s %s %s\r\n", T("Player Name"), T("On For"), T("Idle"), poll_msg); queue_string(call_by, tbuf2); } else if (doing == 2) { ! sprintf(tbuf2, "%s %s %s %s %s Des Sent Recv Pend\r\n", T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); queue_string(call_by, tbuf2); } else { ! sprintf(tbuf2, "%s %s %s %s %s Des Host\r\n", T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); queue_string(call_by, tbuf2); } for (d = descriptor_list; d; d = d->next) { if (d->connected) { --- 4121,4145 ---- if (poll_msg[0] == '\0') strcpy(poll_msg, "Doing"); if (ShowAnsi(call_by->player)) ! sprintf(tbuf2, "%s %s %s %s%s", T("Player Name"), T("On For"), T("Idle"), poll_msg, ANSI_NORMAL); else ! sprintf(tbuf2, "%s %s %s %s", T("Player Name"), T("On For"), T("Idle"), poll_msg); queue_string(call_by, tbuf2); } else if (doing == 2) { ! sprintf(tbuf2, "%s %s %s %s %s Des Sent Recv Pend", T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); queue_string(call_by, tbuf2); } else { ! sprintf(tbuf2, "%s %s %s %s %s Des Host", T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); queue_string(call_by, tbuf2); } + if (SUPPORT_PUEBLO && call_by->pueblo) + queue_newwrite(call_by, "\n", 1); + else + queue_newwrite(call_by, "\r\n", 2); for (d = descriptor_list; d; d = d->next) { if (d->connected) { *************** *** 4230,4236 **** queue_newwrite(call_by, "\r\n", 2); } } else if (call_by->player && Priv_Who(call_by->player) && doing != 1 ! && !match) { if (doing == 0) { /* Wizard WHO for non-logged in connections */ sprintf(tbuf1, "%-16s %6s %9s %5s %4d %3d %s", T("Connecting..."), --- 4192,4198 ---- queue_newwrite(call_by, "\r\n", 2); } } else if (call_by->player && Priv_Who(call_by->player) && doing != 1 ! && (!match || !*match)) { if (doing == 0) { /* Wizard WHO for non-logged in connections */ sprintf(tbuf1, "%-16s %6s %9s %5s %4d %3d %s", T("Connecting..."), *************** *** 4254,4276 **** queue_newwrite(call_by, "\r\n", 2); } } - if (SUPPORT_PUEBLO && call_by->pueblo) { - queue_newwrite(call_by, "\n", 7); - queue_newwrite(call_by, "", 23); - } switch (count) { case 0: ! sprintf(tbuf1, "%s%s", T("There are no players connected."), "\r\n"); break; case 1: ! sprintf(tbuf1, "%s%s", T("There is 1 player connected."), "\r\n"); break; default: ! sprintf(tbuf2, T("There are %d players connected."), count); ! sprintf(tbuf1, "%s\r\n", tbuf2); break; } queue_string(call_by, tbuf1); } const char * --- 4216,4238 ---- queue_newwrite(call_by, "\r\n", 2); } } switch (count) { case 0: ! strcpy(tbuf1, T("There are no players connected.")); break; case 1: ! strcpy(tbuf1, T("There is 1 player connected.")); break; default: ! sprintf(tbuf1, T("There are %d players connected."), count); break; } queue_string(call_by, tbuf1); + if (SUPPORT_PUEBLO && call_by->pueblo) { + queue_newwrite(call_by, "\n\n", 8); + queue_newwrite(call_by, "", 23); + } else + queue_newwrite(call_by, "\r\n", 2); } const char * *************** *** 5034,5051 **** return current; } - #ifdef I_STDARG void WIN32_CDECL channel_broadcast(CHAN *channel, dbref player, int flags, const char *fmt, ...) ! #else ! void ! channel_broadcast(channel, player, flags, va_alist) ! CHAN *channel; ! dbref player; ! int flags; /* 0x1 = checkquiet, 0x2 = nospoof */ ! va_dcl ! #endif { va_list args; #ifdef HAS_VSNPRINTF --- 4996,5005 ---- return current; } void WIN32_CDECL channel_broadcast(CHAN *channel, dbref player, int flags, const char *fmt, ...) ! /* flags: 0x1 = checkquiet, 0x2 = nospoof */ { va_list args; #ifdef HAS_VSNPRINTF *************** *** 5053,5073 **** #else char tbuf1[BUFFER_LEN * 2]; /* Safety margin as per tprintf */ #endif - #ifndef I_STDARG - char *fmt; - #endif struct na_cpass nac; /* Make sure we can write to the channel before doing so */ if (Channel_Disabled(channel)) return; - #ifndef I_STDARG - va_start(args); - fmt = va_arg(args, char *); - #else va_start(args, fmt); - #endif #ifdef HAS_VSNPRINTF (void) vsnprintf(tbuf1, sizeof tbuf1, fmt, args); --- 5007,5019 ---- *** 1_7_5.37/src/boolexp.c Thu, 08 Nov 2001 14:51:56 -0600 dunemush (pennmush/c/39_boolexp.c 1.1.1.21 660) --- 1_7_5.44(w)/src/boolexp.c Mon, 03 Dec 2001 10:23:38 -0600 dunemush (pennmush/c/39_boolexp.c 1.1.1.23 660) *************** *** 279,285 **** if (!a) return 0; strcpy(tbuf1, b->data.atr_lock->text); ! strcpy(tbuf2, a->value); return local_wild_match(tbuf1, tbuf2); case BOOLEXP_EVAL: strcpy(tbuf1, b->data.atr_lock->text); --- 279,285 ---- if (!a) return 0; strcpy(tbuf1, b->data.atr_lock->text); ! strcpy(tbuf2, (const char *) (a->value)); return local_wild_match(tbuf1, tbuf2); case BOOLEXP_EVAL: strcpy(tbuf1, b->data.atr_lock->text); *** 1_7_5.37/src/attrib.c Thu, 25 Oct 2001 15:04:15 -0500 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.3 660) --- 1_7_5.44(w)/src/attrib.c Mon, 03 Dec 2001 10:23:38 -0600 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.4 660) *************** *** 1,11 **** #include "copyrite.h" #include "config.h" - #ifdef I_STRING #include - #else - #include - #endif #include #include "conf.h" #include "attrib.h" --- 1,7 ---- *************** *** 15,21 **** #ifdef MEM_CHECK #include "memcheck.h" #endif - #include "oldattrb.h" #include "parse.h" #include "htab.h" #include "privtab.h" --- 11,16 ---- *************** *** 486,502 **** int ! atr_iter_get(player, thing, name, func, args) ! dbref player; ! dbref thing; ! char const *name; ! #ifdef CAN_TAKE_ARGS_IN_FP ! int (*func) _((dbref player, dbref thing, ! char const *pattern, ATTR *atr, void *args)); ! #else ! int (*func) (); ! #endif ! void *args; { ATTR *ptr, *next; int result; --- 481,488 ---- int ! atr_iter_get(dbref player, dbref thing, const char *name, aig_func func, ! void *args) { ATTR *ptr, *next; int result; *************** *** 595,715 **** } } - /*======================================================================*/ - - char const * - convert_atr(oldatr) - int oldatr; - { - static char result[3]; - - switch (oldatr) { - case A_OSUCC: - return "OSUCCESS"; - case A_OFAIL: - return "OFAILURE"; - case A_FAIL: - return "FAILURE"; - case A_SUCC: - return "SUCCESS"; - case A_PASS: - return "XYXXY"; - case A_DESC: - return "DESCRIBE"; - case A_SEX: - return "SEX"; - case A_ODROP: - return "ODROP"; - case A_DROP: - return "DROP"; - case A_OKILL: - return "OKILL"; - case A_KILL: - return "KILL"; - case A_ASUCC: - return "ASUCCESS"; - case A_AFAIL: - return "AFAILURE"; - case A_ADROP: - return "ADROP"; - case A_AKILL: - return "AKILL"; - case A_USE: - return "DOES"; - case A_CHARGES: - return "CHARGES"; - case A_RUNOUT: - return "RUNOUT"; - case A_STARTUP: - return "STARTUP"; - case A_ACLONE: - return "ACLONE"; - case A_APAY: - return "APAYMENT"; - case A_OPAY: - return "OPAYMENT"; - case A_PAY: - return "PAYMENT"; - case A_COST: - return "COST"; - case A_RAND: - return "RAND"; - case A_LISTEN: - return "LISTEN"; - case A_AAHEAR: - return "AAHEAR"; - case A_AMHEAR: - return "AMHEAR"; - case A_AHEAR: - return "AHEAR"; - case A_LAST: - return "LAST"; - case A_QUEUE: - return "QUEUE"; - case A_IDESC: - return "IDESCRIBE"; - case A_ENTER: - return "ENTER"; - case A_OXENTER: - return "OXENTER"; - case A_AENTER: - return "AENTER"; - case A_ADESC: - return "ADESCRIBE"; - case A_ODESC: - return "ODESCRIBE"; - case A_RQUOTA: - return "RQUOTA"; - case A_ACONNECT: - return "ACONNECT"; - case A_ADISCONNECT: - return "ADISCONNECT"; - case A_LEAVE: - return "LEAVE"; - case A_ALEAVE: - return "ALEAVE"; - case A_OLEAVE: - return "OLEAVE"; - case A_OENTER: - return "OENTER"; - case A_OXLEAVE: - return "OXLEAVE"; - default: - if (oldatr >= 100 && oldatr < 178) { - result[0] = 'V' + (oldatr - 100) / 26; - result[1] = 'A' + (oldatr - 100) % 26; - return result; - } else { - do_rawlog(LT_ERR, - T("ERROR: Invalid attribute number in convert_atr. aborting.")); - abort(); - } - } - /*NOTREACHED */ - return ""; - } - - /*======================================================================*/ int atr_comm_match(thing, player, type, end, str, just_match, atrname, abp) dbref thing; --- 581,586 ---- *** 1_7_5.37/src/Makefile Tue, 04 Sep 2001 09:08:48 -0500 dunemush (pennmush/c/44_Makefile 1.21.1.2 700) --- 1_7_5.44(w)/src/Makefile Tue, 20 Nov 2001 17:10:23 -0600 dunemush (pennmush/c/44_Makefile 1.21.1.3 700) *************** *** 39,45 **** ../hdrs/flags.h ../hdrs/externs.h ../hdrs/case.h \ ../hdrs/help.h ../hdrs/log.h ../hdrs/boolexp.h ../hdrs/match.h \ ../hdrs/lock.h ../hdrs/warnings.h ../hdrs/mymalloc.h ../hdrs/ident.h \ ! ../hdrs/memcheck.h ../hdrs/oldattrb.h ../options.h ../hdrs/log.h \ ../hdrs/game.h ../hdrs/atr_tab.h ../hdrs/dbdefs.h ../hdrs/ansi.h \ ../hdrs/version.h ../hdrs/getpgsiz.h ../hdrs/case.h \ ../config.h ../confmagic.h ../hdrs/function.h ../hdrs/parse.h \ --- 39,45 ---- ../hdrs/flags.h ../hdrs/externs.h ../hdrs/case.h \ ../hdrs/help.h ../hdrs/log.h ../hdrs/boolexp.h ../hdrs/match.h \ ../hdrs/lock.h ../hdrs/warnings.h ../hdrs/mymalloc.h ../hdrs/ident.h \ ! ../hdrs/memcheck.h ../options.h ../hdrs/log.h \ ../hdrs/game.h ../hdrs/atr_tab.h ../hdrs/dbdefs.h ../hdrs/ansi.h \ ../hdrs/version.h ../hdrs/getpgsiz.h ../hdrs/case.h \ ../config.h ../confmagic.h ../hdrs/function.h ../hdrs/parse.h \ *************** *** 277,282 **** --- 277,283 ---- atr_tab.o: ../hdrs/mymalloc.h atr_tab.o: ../hdrs/dbdefs.h atr_tab.o: ../hdrs/log.h + atr_tab.o: ../hdrs/parse.h attrib.o: ../hdrs/copyrite.h attrib.o: ../config.h attrib.o: ../hdrs/conf.h *************** *** 287,293 **** attrib.o: ../hdrs/externs.h attrib.o: ../confmagic.h attrib.o: ../hdrs/match.h - attrib.o: ../hdrs/oldattrb.h attrib.o: ../hdrs/parse.h attrib.o: ../hdrs/htab.h attrib.o: ../hdrs/privtab.h --- 288,293 ---- *************** *** 315,320 **** --- 315,321 ---- boolexp.o: ../hdrs/dbdefs.h boolexp.o: ../hdrs/log.h boolexp.o: ../hdrs/strtree.h + boolexp.o: ../hdrs/memcheck.h bsd.o: ../hdrs/copyrite.h bsd.o: ../config.h bsd.o: ../hdrs/conf.h *************** *** 355,361 **** cmdlocal.o: ../hdrs/htab.h cmdlocal.o: ../hdrs/command.h cmdlocal.o: ../hdrs/switches.h - cmdlocal.o: ../hdrs/cmds.h cmds.o: ../hdrs/copyrite.h cmds.o: ../config.h cmds.o: ../hdrs/conf.h --- 356,361 ---- *************** *** 407,413 **** command.o: ../hdrs/mymalloc.h command.o: ../hdrs/flags.h command.o: ../hdrs/log.h - command.o: ../hdrs/cmds.h command.o: switchinc.c compress.o: ../config.h compress.o: ../options.h --- 407,412 ---- *************** *** 490,495 **** --- 489,495 ---- db.o: ../hdrs/dbdefs.h db.o: ../hdrs/log.h db.o: ../hdrs/strtree.h + db.o: ../hdrs/parse.h destroy.o: ../config.h destroy.o: ../hdrs/copyrite.h destroy.o: ../hdrs/conf.h *************** *** 502,507 **** --- 502,508 ---- destroy.o: ../hdrs/log.h destroy.o: ../hdrs/game.h destroy.o: ../hdrs/extmail.h + destroy.o: ../hdrs/malias.h destroy.o: ../hdrs/attrib.h destroy.o: ../hdrs/dbdefs.h destroy.o: ../hdrs/flags.h *************** *** 582,588 **** function.o: ../hdrs/flags.h function.o: ../hdrs/game.h function.o: ../hdrs/mymalloc.h - function.o: ../hdrs/funs.h fundb.o: ../hdrs/copyrite.h fundb.o: ../config.h fundb.o: ../hdrs/conf.h --- 583,588 ---- *************** *** 804,809 **** --- 804,811 ---- lock.o: ../hdrs/dbdefs.h lock.o: ../hdrs/mymalloc.h lock.o: ../hdrs/strtree.h + lock.o: ../hdrs/privtab.h + lock.o: ../hdrs/parse.h log.o: ../hdrs/copyrite.h log.o: ../config.h log.o: ../hdrs/conf.h *************** *** 930,935 **** --- 932,938 ---- parse.o: ../hdrs/mushdb.h parse.o: ../hdrs/parse.h parse.o: ../hdrs/attrib.h + parse.o: ../hdrs/pcre.h parse.o: ../hdrs/flags.h parse.o: ../hdrs/log.h parse.o: ../hdrs/mymalloc.h *************** *** 980,985 **** --- 983,989 ---- predicat.o: ../hdrs/ansi.h predicat.o: ../hdrs/parse.h predicat.o: ../hdrs/dbdefs.h + predicat.o: ../hdrs/privtab.h predicat.o: ../hdrs/mymalloc.h privtab.o: ../hdrs/copyrite.h privtab.o: ../config.h *************** *** 1153,1158 **** --- 1157,1163 ---- wild.o: ../confmagic.h wild.o: ../hdrs/memcheck.h wild.o: ../hdrs/mymalloc.h + wild.o: ../hdrs/parse.h wild.o: ../hdrs/pcre.h wiz.o: ../hdrs/copyrite.h wiz.o: ../config.h *************** *** 1175,1180 **** --- 1180,1186 ---- wiz.o: ../hdrs/command.h wiz.o: ../hdrs/switches.h wiz.o: ../hdrs/dbdefs.h + wiz.o: ../hdrs/extmail.h ../hdrs/conf.o: ../hdrs/copyrite.h ../hdrs/conf.o: ../options.h ../hdrs/conf.o: ../hdrs/mushtype.h *************** *** 1195,1200 **** --- 1201,1207 ---- ../hdrs/lock.o: ../hdrs/copyrite.h ../hdrs/lock.o: ../hdrs/mushtype.h ../hdrs/lock.o: ../options.h + ../hdrs/lock.o: ../hdrs/conf.h ../hdrs/lock.o: ../hdrs/boolexp.h ../hdrs/mymalloc.o: ../options.h ../hdrs/ident.o: ../config.h *** 1_7_5.37/hdrs/version.h Wed, 14 Nov 2001 14:49:26 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.4 660) --- 1_7_5.44(w)/hdrs/version.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.4 660) *************** *** 1,2 **** ! #define VERSION "PennMUSH version 1.7.5 patchlevel 0 [11/14/2001]" ! #define SHORTVN "PennMUSH 1.7.5p0" --- 1,2 ---- ! #define VERSION "PennMUSH version 1.7.5 patchlevel 1 [12/03/2001]" ! #define SHORTVN "PennMUSH 1.7.5p1" *** 1_7_5.37/hdrs/parse.h Thu, 19 Jul 2001 14:15:24 -0500 dunemush (pennmush/c/51_parse.h 1.10 660) --- 1_7_5.44(w)/hdrs/parse.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/c/51_parse.h 1.11 660) *************** *** 13,28 **** #include "copyrite.h" #include "config.h" - #ifdef I_STDLIB #include - #endif - #ifdef I_LIMITS #include - #else - #ifdef I_VALUES - #include - #endif - #endif #include #include "confmagic.h" --- 13,20 ---- *************** *** 87,98 **** /* All function declarations follow the format: */ - #ifdef CAN_NEWSTYLE #define FUNCTION(fun_name) \ /* ARGSUSED */ /* try to keep lint happy */ \ ! void fun_name _((char *buff, char **bp, int nargs, char *args[], \ dbref executor, dbref caller, dbref enactor, \ ! char const *called_as, PE_Info *pe_info)); \ void fun_name(char *buff __attribute__ ((__unused__)), \ char **bp __attribute__ ((__unused__)), \ int nargs __attribute__ ((__unused__)), \ --- 79,89 ---- /* All function declarations follow the format: */ #define FUNCTION(fun_name) \ /* ARGSUSED */ /* try to keep lint happy */ \ ! void fun_name (char *buff, char **bp, int nargs, char *args[], \ dbref executor, dbref caller, dbref enactor, \ ! char const *called_as, PE_Info *pe_info); \ void fun_name(char *buff __attribute__ ((__unused__)), \ char **bp __attribute__ ((__unused__)), \ int nargs __attribute__ ((__unused__)), \ *************** *** 102,125 **** dbref enactor __attribute__ ((__unused__)), \ char const *called_as __attribute__ ((__unused__)), \ PE_Info *pe_info __attribute__ ((__unused__))) - #else - #define FUNCTION(fun_name) \ - /* ARGSUSED */ /* try to make lint happy */ \ - void fun_name _((char *buff, char **bp, int nargs, char *args[], \ - dbref executor, dbref caller, dbref enactor, \ - char const *called_as, PE_Info *pe_info)); \ - void fun_name(buff, bp, nargs, args, executor, caller, enactor, \ - called_as, pe_info) \ - char *buff __attribute__ ((__unused__)); \ - char **bp __attribute__ ((__unused__)); \ - int nargs __attribute__ ((__unused__)); \ - char *args[] __attribute__ ((__unused__)); \ - dbref executor __attribute__ ((__unused__)); \ - dbref caller __attribute__ ((__unused__)); \ - dbref enactor __attribute__ ((__unused__)); \ - char const *called_as __attribute__ ((__unused__)); \ - PE_Info *pe_info __attribute__ ((__unused__)); - #endif /* All results are returned in buff, at the point *bp. *bp is likely * not equal to buff, so make no assumptions about writing at the --- 93,98 ---- *** 1_7_5.37/hdrs/game.h Fri, 09 Nov 2001 13:25:20 -0600 dunemush (pennmush/d/12_game.h 1.28.1.2.1.2 660) --- 1_7_5.44(w)/hdrs/game.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/d/12_game.h 1.28.1.2.1.3 660) *************** *** 88,94 **** extern void do_name _((dbref player, const char *name, char *newname)); extern void do_chown _((dbref player, const char *name, const char *newobj, int preserve)); ! extern void do_chzone _((dbref player, const char *name, const char *newobj)); extern int do_set _((dbref player, const char *name, char *flag)); extern void do_cpattr _((dbref player, char *oldpair, char **newpair, int move, int noflagcopy)); --- 88,95 ---- extern void do_name _((dbref player, const char *name, char *newname)); extern void do_chown _((dbref player, const char *name, const char *newobj, int preserve)); ! extern int do_chzone(dbref player, const char *name, const char *newobj, ! int noisy); extern int do_set _((dbref player, const char *name, char *flag)); extern void do_cpattr _((dbref player, char *oldpair, char **newpair, int move, int noflagcopy)); *** 1_7_5.37/hdrs/function.h Fri, 11 May 2001 18:11:50 -0500 dunemush (pennmush/d/13_function.h 1.12 660) --- 1_7_5.44(w)/hdrs/function.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/d/13_function.h 1.13 660) *************** *** 33,46 **** typedef struct fun FUN; union fun_call { ! #ifdef CAN_TAKE_ARGS_IN_FP ! void (*fun) _((char *buff, char **bp, int nargs, char *args[], ! dbref executor, dbref caller, dbref enactor, ! char const *called_as, PE_Info * pe_info)); ! #else ! void (*fun) (); ! #endif Size_t offset; }; --- 33,43 ---- typedef struct fun FUN; + typedef void (*function_func) (char *, char **, int, char *[], dbref, dbref, + dbref, const char *, PE_Info *); + union fun_call { ! function_func fun; Size_t offset; }; *************** *** 87,105 **** #define FUNCTION_PROTO(fun_name) \ ! extern void fun_name _((char *buff, char **bp, int nargs, char *args[], \ dbref executor, dbref caller, dbref enactor, \ ! char const *called_as, PE_Info *pe_info)) ! #ifdef CAN_TAKE_ARGS_IN_FP ! extern void function_add _((const char *name, void (*fun) ! _((char *buff, char **bp, int nargs, ! char *args[], dbref executor, dbref caller, ! dbref enactor, char const *called_as, ! PE_Info * pe_info)), int minargs, ! int maxargs, int ftype)); ! #else ! extern void function_add _((const char *name, void (*fun) (), int minargs, ! int maxargs, int ftype)); ! #endif #endif --- 84,93 ---- #define FUNCTION_PROTO(fun_name) \ ! extern void fun_name (char *buff, char **bp, int nargs, char *args[], \ dbref executor, dbref caller, dbref enactor, \ ! char const *called_as, PE_Info *pe_info) ! extern void function_add(const char *name, function_func fun, int minargs, ! int maxargs, int ftype); #endif *** 1_7_5.37/hdrs/extmail.h Sat, 10 Feb 2001 09:13:21 -0600 dunemush (pennmush/d/15_extmail.h 1.6 660) --- 1_7_5.44(w)/hdrs/extmail.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/d/15_extmail.h 1.7 660) *************** *** 37,43 **** #define Unread(m) (!Read(m)) #define All(ms) (ms.flags & M_ALL) #define AllInFolder(ms) (ms.flags & M_FOLDER) ! #define MSFolder(ms) ((ms.flags & ~M_FMASK) >> 8) typedef unsigned int mail_flag; --- 37,43 ---- #define Unread(m) (!Read(m)) #define All(ms) (ms.flags & M_ALL) #define AllInFolder(ms) (ms.flags & M_FOLDER) ! #define MSFolder(ms) ((int)((ms.flags & ~M_FMASK) >> 8U)) typedef unsigned int mail_flag; *** 1_7_5.37/hdrs/externs.h Fri, 26 Oct 2001 10:44:14 -0500 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.11 660) --- 1_7_5.44(w)/hdrs/externs.h Mon, 03 Dec 2001 10:23:42 -0600 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.13 660) *************** *** 27,34 **** #define strcasecmp(s1,s2) _stricmp((s1), (s2)) #define strncasecmp(s1,s2,n) _strnicmp((s1), (s2), (n)) #else ! extern int strcasecmp _((const char *s1, const char *s2)); ! extern int strncasecmp _((const char *s1, const char *s2, Size_t n)); #endif #endif --- 27,34 ---- #define strcasecmp(s1,s2) _stricmp((s1), (s2)) #define strncasecmp(s1,s2,n) _strnicmp((s1), (s2), (n)) #else ! extern int strcasecmp(const char *s1, const char *s2); ! extern int strncasecmp(const char *s1, const char *s2, Size_t n); #endif #endif *************** *** 95,112 **** #define NA_PONLY 0x0020 #define NA_PUPPET 0x0040 ! #ifdef CAN_TAKE_ARGS_IN_FP ! extern void notify_anything _((dbref speaker, dbref (*func) (dbref, void *), ! void *fdata, ! char *(*nsfunc) (dbref, ! dbref (*func) (dbref, void *), ! void *, int), int flags, ! const char *message)); ! #else ! extern void notify_anything _((dbref speaker, dbref (*func) (), ! void *fdata, char *(*nsfunc) (), int flags, ! const char *message)); ! #endif extern dbref na_one _((dbref current, void *data)); extern dbref na_next _((dbref current, void *data)); extern dbref na_loc _((dbref current, void *data)); --- 95,106 ---- #define NA_PONLY 0x0020 #define NA_PUPPET 0x0040 ! extern void notify_anything(dbref speaker, dbref (*func) (dbref, void *), ! void *fdata, ! char *(*nsfunc) (dbref, ! dbref (*func) (dbref, void *), ! void *, int), int flags, ! const char *message); extern dbref na_one _((dbref current, void *data)); extern dbref na_next _((dbref current, void *data)); extern dbref na_loc _((dbref current, void *data)); *************** *** 258,270 **** _((dbref player, dbref thing, dbref newowner, int preserve)); /* From speech.c */ - #ifdef CAN_TAKE_ARGS_IN_FP - extern char *ns_esnotify - _((dbref speaker, dbref (*func) (dbref, void *), void *fdata, int para)); - #else extern char *ns_esnotify ! _((dbref speaker, dbref (*func) (), void *fdata, int para)); ! #endif extern void notify_except _((dbref first, dbref exception, const char *msg)); extern void notify_except2 _((dbref first, dbref exc1, dbref exc2, const char *msg)); --- 252,259 ---- _((dbref player, dbref thing, dbref newowner, int preserve)); /* From speech.c */ extern char *ns_esnotify ! (dbref speaker, dbref (*func) (dbref, void *), void *fdata, int para); extern void notify_except _((dbref first, dbref exception, const char *msg)); extern void notify_except2 _((dbref first, dbref exc1, dbref exc2, const char *msg)); *************** *** 296,301 **** --- 285,299 ---- #define vsnprintf _vsnprintf #endif #endif + #if defined(WIN32) + #define strncoll(s1,s2,n) _strncoll((s1), (s2), (n)) + #define strcasecoll(s1,s2) _stricoll((s1), (s2)) + #define strncasecoll(s1,s2,n) _strnicoll((s1), (s2), (n)) + #elif defined(HAS_STRXFRM) + extern int strncoll(const char *, const char *, size_t); + extern int strcasecoll(const char *, const char *); + extern int strncasecoll(const char *, const char *, size_t); + #endif extern char *remove_markup _((const char *orig, Size_t *stripped_len)); extern char *skip_leading_ansi _((const char *s)); typedef struct { *************** *** 313,318 **** --- 311,319 ---- extern void depopulate_codes _((ansi_string * as)); extern int ansi_save _((const char *string, int length, char *buff, char **bp)); extern int ansi_align _((const char *string, int length)); + extern int strncoll _((const char *s1, const char *s2, Size_t t)); + extern int strcasecoll _((const char *s1, const char *s2)); + extern int strncasecoll _((const char *s1, const char *s2, Size_t t)); /* Append a character to the end of a BUFFER_LEN long s