Changeset 1117
- Timestamp:
- 10/05/07 15:36:32 (11 months ago)
- Files:
-
- 1.8.3/trunk/CHANGES.182 (modified) (2 diffs)
- 1.8.3/trunk/CHANGES.183 (modified) (1 diff)
- 1.8.3/trunk/MANIFEST (modified) (2 diffs)
- 1.8.3/trunk/Makefile.in (modified) (3 diffs)
- 1.8.3/trunk/Patchlevel (modified) (1 diff)
- 1.8.3/trunk/UPGRADING (modified) (1 diff)
- 1.8.3/trunk/configure (modified) (3 diffs)
- 1.8.3/trunk/configure.in (modified) (1 diff)
- 1.8.3/trunk/game/txt/hlp/penncmd.hlp (modified) (3 diffs)
- 1.8.3/trunk/game/txt/hlp/pennfunc.hlp (modified) (5 diffs)
- 1.8.3/trunk/game/txt/hlp/pennv182.hlp (modified) (1 diff)
- 1.8.3/trunk/game/txt/hlp/pennv183.hlp (modified) (2 diffs)
- 1.8.3/trunk/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.3/trunk/hdrs/access.h (modified) (3 diffs)
- 1.8.3/trunk/hdrs/ansi.h (modified) (6 diffs)
- 1.8.3/trunk/hdrs/extchat.h (modified) (1 diff)
- 1.8.3/trunk/hdrs/externs.h (modified) (4 diffs)
- 1.8.3/trunk/hdrs/extmail.h (modified) (1 diff)
- 1.8.3/trunk/hdrs/htab.h (modified) (1 diff)
- 1.8.3/trunk/hdrs/mushtype.h (modified) (1 diff)
- 1.8.3/trunk/hdrs/version.h (modified) (1 diff)
- 1.8.3/trunk/src/access.c (modified) (19 diffs)
- 1.8.3/trunk/src/atr_tab.c (modified) (1 diff)
- 1.8.3/trunk/src/bsd.c (modified) (11 diffs)
- 1.8.3/trunk/src/cmds.c (modified) (1 diff)
- 1.8.3/trunk/src/command.c (modified) (2 diffs)
- 1.8.3/trunk/src/conf.c (modified) (1 diff)
- 1.8.3/trunk/src/db.c (modified) (4 diffs)
- 1.8.3/trunk/src/extchat.c (modified) (1 diff)
- 1.8.3/trunk/src/extmail.c (modified) (10 diffs)
- 1.8.3/trunk/src/flags.c (modified) (1 diff)
- 1.8.3/trunk/src/function.c (modified) (4 diffs)
- 1.8.3/trunk/src/funlist.c (modified) (9 diffs)
- 1.8.3/trunk/src/funmisc.c (modified) (1 diff)
- 1.8.3/trunk/src/funstr.c (modified) (11 diffs)
- 1.8.3/trunk/src/game.c (modified) (4 diffs)
- 1.8.3/trunk/src/help.c (modified) (1 diff)
- 1.8.3/trunk/src/htab.c (modified) (17 diffs)
- 1.8.3/trunk/src/local.dst (modified) (1 diff)
- 1.8.3/trunk/src/lock.c (modified) (1 diff)
- 1.8.3/trunk/src/log.c (modified) (2 diffs)
- 1.8.3/trunk/src/look.c (modified) (3 diffs)
- 1.8.3/trunk/src/malias.c (modified) (1 diff)
- 1.8.3/trunk/src/markup.c (modified) (55 diffs)
- 1.8.3/trunk/src/mymalloc.c (modified) (2 diffs)
- 1.8.3/trunk/src/notify.c (modified) (12 diffs)
- 1.8.3/trunk/src/plyrlist.c (modified) (1 diff)
- 1.8.3/trunk/src/set.c (modified) (1 diff)
- 1.8.3/trunk/src/sort.c (modified) (19 diffs)
- 1.8.3/trunk/src/speech.c (modified) (13 diffs)
- 1.8.3/trunk/src/sql.c (modified) (9 diffs)
- 1.8.3/trunk/src/strutil.c (modified) (1 diff)
- 1.8.3/trunk/src/utils.c (modified) (8 diffs)
- 1.8.3/trunk/src/warnings.c (modified) (3 diffs)
- 1.8.3/trunk/src/wild.c (modified) (1 diff)
- 1.8.3/trunk/src/wiz.c (modified) (5 diffs)
- 1.8.3/trunk/test/TestHarness.pm (modified) (4 diffs)
- 1.8.3/trunk/test/alltests.pl (deleted)
- 1.8.3/trunk/test/alltests.sh.in (copied) (copied from 1.8.3/branches/devel/test/alltests.sh.in)
- 1.8.3/trunk/test/runtest.pl (copied) (copied from 1.8.3/branches/devel/test/runtest.pl)
- 1.8.3/trunk/test/testalias.pl (modified) (1 diff)
- 1.8.3/trunk/test/testatree.pl (modified) (2 diffs)
- 1.8.3/trunk/test/testdecompose.pl (modified) (1 diff)
- 1.8.3/trunk/test/testdigest.pl (modified) (1 diff)
- 1.8.3/trunk/test/testdistxd.pl (modified) (1 diff)
- 1.8.3/trunk/test/testfirstof.pl (modified) (1 diff)
- 1.8.3/trunk/test/testgrep.pl (modified) (1 diff)
- 1.8.3/trunk/test/testhastype.pl (modified) (1 diff)
- 1.8.3/trunk/test/testjust.pl (modified) (1 diff)
- 1.8.3/trunk/test/testletq.pl (modified) (1 diff)
- 1.8.3/trunk/test/testmath.pl (modified) (1 diff)
- 1.8.3/trunk/test/testnull.pl (modified) (1 diff)
- 1.8.3/trunk/test/testpage.pl (modified) (1 diff)
- 1.8.3/trunk/test/testrand.pl (modified) (1 diff)
- 1.8.3/trunk/test/testreswitch.pl (modified) (1 diff)
- 1.8.3/trunk/test/testsetfuns.pl (modified) (1 diff)
- 1.8.3/trunk/test/teststringsecs.pl (modified) (1 diff)
- 1.8.3/trunk/test/testtr.pl (modified) (1 diff)
- 1.8.3/trunk/utils/mkcmds.pl (modified) (1 diff)
- 1.8.3/trunk/win32/msvc.net/pennmush.vcproj (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/trunk/CHANGES.182
r1108 r1117 14 14 ========================================================================== 15 15 16 Version 1.8.2 patchlevel 7 August27, 200716 Version 1.8.2 patchlevel 7 Aug 27, 2007 17 17 18 18 Minor changes: … … 31 31 compression algorithm. Any will work, and always have. 32 32 Reported by Andrew Klein. 33 * Crash bug in @purge. Javelin.34 33 35 34 Version 1.8.2 patchlevel 6 July 9, 2007 1.8.3/trunk/CHANGES.183
r1036 r1117 15 15 ========================================================================== 16 16 17 Version 1.8.3 patchlevel 4 ???? ??, 2007 17 Version 1.8.3 patchlevel 5 August 27, 2007 18 19 Major changes: 20 * Significant rewrite of ansi parsing and better ansi support 21 for many string-handling functions. Patch by Sketch. 22 * Rewrite of the softcode regression testing framework, and 23 addition of more tests. [SW] 24 25 Minor changes: 26 * Store a pointer to the start of a player's mailbox in objdata 27 instead of the connection struct. 28 * Experimental rewrite of hash tables to use the cuckoo hashing 29 algorithm, with constant-time lookups even in the worst case. 30 (And appears to have generally faster lookup even in normal usage.) 31 * Regular expression @sitelocks save the compiled regexp instead of 32 recompiling every time the rule is tested. 33 * Added %4 to @pageformat, which is the default page message. 34 35 Commands: 36 * Added @message, which makes it easy to use @chatformat or 37 @pageformat via @hooks, or to create your own *format. 38 39 Functions: 40 * Added message(), the function version of @message. 41 42 Fixes: 43 * decode64() does better validation of its input. [SW] 44 * Various compile fixes reported by Interevis and Kimiko. 45 Win32 patched by Intrevis. 46 * @sitelock does better error reporting. [SW] 47 * Crash bug related to regeditall fixed. 48 * @decompile didn't handle attribute trees correctly. 49 * Compile failure in funstr.c on some systems. Fixed by Boris. 50 * '@set =foo' failed silently. Reported by Talvo. 51 * Fixes from 1.8.2p7 52 53 Version 1.8.3 patchlevel 4 July 9, 2007 18 54 19 55 Major changes: 1.8.3/trunk/MANIFEST
r1032 r1117 234 234 src/wild.c 235 235 src/wiz.c 236 test/README 236 237 test/MUSHConnection.pm 237 238 test/PennMUSH.pm 238 239 test/TestHarness.pm 239 test/alltests.pl 240 test/alltests.sh.in 241 test/runtest.pl 240 242 test/testalias.pl 241 243 test/testatree.pl … … 257 259 test/teststringsecs.pl 258 260 test/testtr.pl 261 test/testtrim.pl 259 262 utils/clwrapper.sh 260 263 utils/customize.pl 1.8.3/trunk/Makefile.in
r1039 r1117 4 4 5 5 VERSION=1.8.3 6 PATCHLEVEL= 46 PATCHLEVEL=5 7 7 8 8 # … … 81 81 netmud: 82 82 (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ 83 "SQL_CFLAGS=$(SQL_CFLAGS)" "SQL_LDFLAGS=$(SQL_LDFLAGS)" \ 83 84 "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" ) 84 85 … … 163 164 update-hdr: 164 165 -@@TOUCH@ options.h.dist 166 -@sleep 2 165 167 -@@PERL@ utils/update.pl options.h options.h.dist 166 168 1.8.3/trunk/Patchlevel
r1032 r1117 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.3p 42 This is PennMUSH 1.8.3p5 1.8.3/trunk/UPGRADING
r1032 r1117 119 119 *** target version of PennMUSH. PennMUSH 1.7.7+ can no longer read 120 120 *** 1.7.4 databases. 121 122 *** If you are upgrading from 1.7.6 or certain 1.7.7 versions, 123 *** you may also first need to load your database under PennMUSH 124 *** 1.8.0p13 and then dump it, and load this converted database 125 *** under your target version of PennMUSH. 121 126 122 127 ============================================================================ 1.8.3/trunk/configure
r1032 r1117 17944 17944 ac_config_files="$ac_config_files game/txt/compose.sh" 17945 17945 17946 ac_config_files="$ac_config_files test/alltests.sh" 17947 17946 17948 cat >confcache <<\_ACEOF 17947 17949 # This file is a shell script that caches the results of configure … … 18488 18490 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; 18489 18491 "game/txt/compose.sh") CONFIG_FILES="$CONFIG_FILES game/txt/compose.sh" ;; 18492 "test/alltests.sh") CONFIG_FILES="$CONFIG_FILES test/alltests.sh" ;; 18490 18493 18491 18494 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 … … 19034 19037 case $ac_file$ac_mode in 19035 19038 "game/txt/compose.sh":F) chmod +x game/txt/compose.sh ;; 19039 "test/alltests.sh":F) chmod +x test/alltests.sh ;; 19036 19040 19037 19041 esac 1.8.3/trunk/configure.in
r1032 r1117 288 288 AC_CONFIG_FILES([Makefile src/Makefile]) 289 289 AC_CONFIG_FILES([game/txt/compose.sh], [chmod +x game/txt/compose.sh]) 290 AC_CONFIG_FILES([test/alltests.sh], [chmod +x test/alltests.sh]) 290 291 AC_OUTPUT 1.8.3/trunk/game/txt/hlp/penncmd.hlp
r1084 r1117 457 457 458 458 Examples: 459 > @va obj=$testme *:@pemit %#=Before break;@break %0;@pemit %#=After break 459 > @va obj=$testme *:@pemit %#=You try a test; 460 @break [lt(%0,10)] = @pemit %#=But you're too low!; 461 @pemit %#=And you succeed! 460 462 > testme 0 461 Before break 462 After break 463 > testme 1 464 Before break 463 You try a test 464 But you're too low! 465 > testme 10 466 You try a test 467 And you succeed! 465 468 466 469 > @force me={@switch 1=1, think Third; think First; @break 1; think Second} … … 2214 2217 Object says, "2" 2215 2218 Object says, "1" 2219 & @message 2220 @message[/switch] <player list>=<message>,<attribute>[,<arg1>,...] 2221 2222 @message is designed for the use of *format messages, such as 2223 @pageformat or @chatformat. 2224 2225 It sends <message> to each player given in <player list> unless they 2226 have <attribute> set. If the executor can u() the player's attribute, 2227 then instead of <message>, they will see the output that is identical 2228 to: 2229 2230 u(<player>/<attribute>,<arg1>,...) 2231 2232 It is intended for use with @hooking page, @chat, or say/pose/emit. 2233 2234 Switches: NOEVAL and SPOOF. If the executor is either wizard or has 2235 the NsPemit power, then SPOOF will make the message appear to be 2236 from the enactor. 2237 2238 See also: message(), @chatformat, @pageformat 2216 2239 & @motd 2217 2240 @motd [/<switch>] [<message>]. … … 2612 2635 %2 will be set to the alias of the pager, if any. 2613 2636 %3 will be a space-separated list of recipient dbrefs. 2637 %4 will be set to the default message. 2614 2638 2615 2639 To obtain 'page_aliases' behavior: 1.8.3/trunk/game/txt/hlp/pennfunc.hlp
r1032 r1117 1234 1234 get_eval(<object>/<attribute>) 1235 1235 1236 Eval() works the same way as xget(), except that it performs %-substitutions 1237 and function evaluation on the attribute before returning the value. eval() 1238 does not modify the stack (%0-%9), so the attribute being evaled sees the 1239 same values for them that the calling code does. Unless you need this behavior, 1240 it is better to use u() instead, which hides the caller's stack. 1236 Eval() works the same way as xget(), except that it performs 1237 %-substitutions and function evaluation on the attribute before 1238 returning the value. eval() changes the enactor (%#) to the object 1239 executing the eval (%!). It does not modify the stack (%0-%9), so 1240 the attribute being evaled sees the same values for them that the 1241 calling code does. Unless you need this behavior, it is better to 1242 use u() instead, which hides the caller's stack. 1241 1243 1242 1244 Example: … … 2001 2003 See also: capstr(), ucstr() 2002 2004 & LDELETE() 2003 Ldelete(<list>, <position >[,<single-character separator>])2004 2005 This deletes the item at <position> in the list. If a separator2005 Ldelete(<list>, <position(s)>[,<single-character separator>]) 2006 2007 This deletes the item(s) at <position(s)> in the list. If a separator 2006 2008 character is not given, a space is assumed. Null items are 2007 counted, as in 'items()'. 2009 counted, as in 'items()'. Positions are numeric and must be 2010 separated by spaces. 2008 2011 2009 2012 Examples: … … 2536 2539 2537 2540 See also: splice(), tr() 2541 & MESSAGE() 2542 message(<player list>, <message>, <attribute>[,<arg1>,...]) 2543 2544 message() is the function form of @message. 2538 2545 & MID() 2539 2546 mid(<string>, <first>, <length>) … … 2818 2825 will have this dbref. 2819 2826 2820 & NMWHO()2821 nmwho()2822 2823 This returns a count of all currently connected, non-hidden players.2824 It's exactly the same as nwho() used by a mortal, and is suitable2825 for use on privileged global objects who need an unprivileged count2826 of who's online.2827 2828 See also: nwho(), mwho(), xmwho()2829 2827 & NOR() 2830 2828 nor(<boolean>[, ... , <booleanN>]) … … 2895 2893 2896 2894 See also: ncon(), nexits(), xthings(), lthings(), lvthings() 2895 & NMWHO() 2897 2896 & NWHO() 2898 2897 nwho() 2899 2900 This returns a count of all currently-connected players. When 2898 nwho(<viewer>) 2899 nmwho() 2900 2901 nwho() returns a count of all currently-connected players. When 2901 2902 mortals use this function, DARK wizards or royalty are NOT counted. 2902 2903 2903 See also: lwho(), nmwho(), xwho() 2904 nmwho() returns a count of all currently connected, non-hidden players. 2905 It's exactly the same as nwho() used by a mortal, and is suitable 2906 for use on privileged global objects that always need an unprivileged 2907 count of who is online. 2908 2909 If nwho() is given an argument, and is used by an object that can see 2910 DARK and Hidden players, nwho() returns the count of online players 2911 based on what <viewer> can see. 2912 2913 See also: lwho(), mwho(), xwho(), xmwho() 2904 2914 & OBJ() 2905 2915 obj(<object>) 1.8.3/trunk/game/txt/hlp/pennv182.hlp
r1036 r1117 1 & 1.8.2p7 2 Version 1.8.2 patchlevel 7 Aug 27, 2007 3 4 Minor changes: 5 * nwho() now takes an optional viewer argument like lwho(). 6 7 Fixes: 8 * Clarified the behavior of eval() and get_eval() in help. Suggested by 9 Talvo and Javelin. 10 * A failed db save no longer broadcasts a success message in addition to a 11 failure one. Reported by Cooee. 12 * The open database file wasn't getting closed on a failed save. 13 * Crash bug in sortkey(). Fix by Nathan Baum. 14 * 'help @desc' brings up @describe instead of @descformat. 15 Suggested by Nymeria. 16 * Removed mention of Win32 requiring a particular attribute 17 compression algorithm. Any will work, and always have. 18 Reported by Andrew Klein. 19 1 20 & 1.8.2p6 2 21 Version 1.8.2 patchlevel 6 July 9, 2007 1.8.3/trunk/game/txt/hlp/pennv183.hlp
r1036 r1117 1 & 1.8.3p 41 & 1.8.3p5 2 2 & changes 3 3 This is a list of changes in this patchlevel which are probably of … … 12 12 be read in 'help patchlevels'. 13 13 14 Version 1.8.3 patchlevel 4 ???? ??, 2007 14 Version 1.8.3 patchlevel 5 August 27, 2007 15 16 Major changes: 17 * Significant rewrite of ansi parsing and better ansi support 18 for many string-handling functions. Patch by Sketch. 19 * Rewrite of the softcode regression testing framework, and 20 addition of more tests. [SW] 21 22 Minor changes: 23 * Store a pointer to the start of a player's mailbox in objdata 24 instead of the connection struct. 25 * Experimental rewrite of hash tables to use the cuckoo hashing 26 algorithm, with constant-time lookups even in the worst case. 27 (And appears to have generally faster lookup even in normal usage.) 28 * Regular expression @sitelocks save the compiled regexp instead of 29 recompiling every time the rule is tested. 30 * Added %4 to @pageformat, which is the default page message. 31 32 Commands: 33 * Added @message, which makes it easy to use @chatformat or 34 @pageformat via @hooks, or to create your own *format. 35 36 Functions: 37 * Added message(), the function version of @message. 38 39 Fixes: 40 * decode64() does better validation of its input. [SW] 41 * Various compile fixes reported by Interevis and Kimiko. 42 Win32 patched by Intrevis. 43 * @sitelock does better error reporting. [SW] 44 * Crash bug related to regeditall fixed. 45 * @decompile didn't handle attribute trees correctly. 46 * Compile failure in funstr.c on some systems. Fixed by Boris. 47 * '@set =foo' failed silently. Reported by Talvo. 48 * Fixes from 1.8.2p7 49 50 & 1.8.3p4 51 Version 1.8.3 patchlevel 4 July 9, 2007 15 52 16 53 Major changes: 1.8.3/trunk/game/txt/hlp/pennvOLD.hlp
r1032 r1117 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.3: 0, 1, 2, 3, 4 4421 1.8.2: 0, 1, 2, 3, 4, 5, 6 4420 1.8.3: 0, 1, 2, 3, 4, 5 4421 1.8.2: 0, 1, 2, 3, 4, 5, 6, 7 4422 4422 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4423 4423 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.8.3/trunk/hdrs/access.h
r919 r1117 10 10 char comment[BUFFER_LEN]; /**< A comment about the rule */ 11 11 dbref who; /**< Who created this rule if sitelock used */ 12 int can; /**< Bitflags of what the host can do */ 13 int cant; /**< Bitflags of what the host can't do */ 12 uint32_t can; /**< Bitflags of what the host can do */ 13 uint32_t cant; /**< Bitflags of what the host can't do */ 14 pcre *re; /**< Compiled regexp */ 14 15 struct access *next; /**< Pointer to next rule in the list */ 15 16 }; … … 17 18 18 19 /* These flags are can/can't - a site may or may not be allowed to do them */ 19 #define ACS_CONNECT 0x1 /* Connect to non-guests */20 #define ACS_CREATE 0x2 /* Create new players */21 #define ACS_GUEST 0x4 /* Connect to guests */22 #define ACS_REGISTER 0x8 /* Site can use the 'register' command */20 #define ACS_CONNECT 0x1U /* Connect to non-guests */ 21 #define ACS_CREATE 0x2U /* Create new players */ 22 #define ACS_GUEST 0x4U /* Connect to guests */ 23 #define ACS_REGISTER 0x8U /* Site can use the 'register' command */ 23 24 /* These flags are set in the 'can' bit, but they mark special processing */ 24 #define ACS_SITELOCK 0x10 /* Marker for where to insert @sitelock */25 #define ACS_SUSPECT 0x20 /* All players from this site get SUSPECT */26 #define ACS_DENY_SILENT 0x40 /* Don't log failed attempts */27 #define ACS_REGEXP 0x80 /* Treat the host pattern as a regexp */25 #define ACS_SITELOCK 0x10U /* Marker for where to insert @sitelock */ 26 #define ACS_SUSPECT 0x20U /* All players from this site get SUSPECT */ 27 #define ACS_DENY_SILENT 0x40U /* Don't log failed attempts */ 28 #define ACS_REGEXP 0x80U /* Treat the host pattern as a regexp */ 28 29 29 #define ACS_GOD 0x100 /* God can connect from this site */30 #define ACS_WIZARD 0x200 /* Wizards can connect from this site */31 #define ACS_ADMIN 0x400 /* Admins can connect from this site */30 #define ACS_GOD 0x100U /* God can connect from this site */ 31 #define ACS_WIZARD 0x200U /* Wizards can connect from this site */ 32 #define ACS_ADMIN 0x400U /* Admins can connect from this site */ 32 33 33 34 /* This is the usual default access */ … … 45 46 46 47 /* Public functions */ 47 intread_access_file(void);48 bool read_access_file(void); 48 49 void write_access_file(void); 49 int site_can_access(const char *hname, int flag, dbref who);50 bool site_can_access(const char *hname, uint32_t flag, dbref who); 50 51 struct access *site_check_access(const char *hname, dbref who, int *rulenum); 51 intformat_access(struct access *ap, int rulenum,52 dbref who53 __attribute__ ((__unused__)), char *buff, char **bp);54 int add_access_sitelock(dbref player, const char *host, dbref who, int can,55 int cant);52 void format_access(struct access *ap, int rulenum, 53 dbref who 54 __attribute__ ((__unused__)), char *buff, char **bp); 55 bool add_access_sitelock(dbref player, const char *host, dbref who, 56 uint32_t can, uint32_t cant); 56 57 int remove_access_sitelock(const char *pattern); 57 58 void do_list_access(dbref player); 58 59 int parse_access_options 59 (const char *opts, dbref *who, int *can, int *cant, dbref player);60 (const char *opts, dbref *who, uint32_t * can, uint32_t * cant, dbref player); 60 61 61 62 #endif /* __ACCESS_H */ 1.8.3/trunk/hdrs/ansi.h
r1032 r1117 22 22 #define BEEP_CHAR '\a' 23 23 #define ESC_CHAR '\x1B' 24 25 #define ANSI_RAW_NORMAL "\x1B[0m" 24 26 25 27 #define TAG_START '\002' … … 81 83 #endif 82 84 83 structansi_data {85 typedef struct _ansi_data { 84 86 uint8_t bits; 85 87 uint8_t offbits; 86 88 char fore; 87 89 char back; 88 } ;90 } ansi_data; 89 91 90 int read_raw_ansi_data(struct ansi_data *store, const char *codes); 91 int write_ansi_data(struct ansi_data *cur, char *buff, char **bp); 92 int read_raw_ansi_data(ansi_data * store, const char *codes); 93 int write_raw_ansi_data(ansi_data * old, ansi_data * cur, char *buff, 94 char **bp); 92 95 93 int write_raw_ansi_data(struct ansi_data *old, struct ansi_data *cur, 94 char *buff, char **bp);96 void define_ansi_data(ansi_data * store, const char *str); 97 int write_ansi_data(ansi_data * cur, char *buff, char **bp); 95 98 96 99 97 void define_ansi_data(struct ansi_data *store, const char *str); 98 void nest_ansi_data(struct ansi_data *old, struct ansi_data *cur); 100 void nest_ansi_data(ansi_data * old, ansi_data * cur); 99 101 100 102 #define MARKUP_COLOR 'c' … … 105 107 106 108 /* Markup information necessary for ansi_string */ 109 110 /* Miscellaneous notes on markup_information: 111 * If "start" is negative, there are two cases: 112 * end >= 0 :: A stand-alone tag, starting at "end". 113 * end < 0 :: A tag set for removal. 114 * If start is non-negative while end is negative, something's broken. 115 * 116 * Markup surrounding a character ends to the right of that character: 117 * In the string "abc", if 'b' has a markup assigned to only itself, 118 * start = 1, end = 2. (Instead of end = 1) 119 */ 120 107 121 typedef struct _markup_information { 108 122 char *start_code; 109 123 char *stop_code; 110 struct ansi_data ansi;111 124 char type; 112 125 int start; … … 118 131 typedef struct _ansi_string { 119 132 char text[BUFFER_LEN]; /**< Text of the string */ 133 ansi_data ansi[BUFFER_LEN]; /**< ANSI of the string */ 120 134 markup_information markup[BUFFER_LEN]; /**< The markup_information list */ 121 int nmarkups; 135 int nmarkups; /**< Number of Pueblo markups */ 122 136 int len; /**< Length of text */ 123 int optimized; /**< Has this ansi -string been optimized? */137 int optimized; /**< Has this ansi_string been optimized? */ 124 138 } ansi_string; 125 139 … … 131 145 parse_ansi_string(const char *src) 132 146 __attribute_malloc__; 133 extern ansi_string *parse_ansi_string_real(const char *src, int oldstyle)134 __attribute_malloc__;135 147 extern void flip_ansi_string(ansi_string *as); 136 148 extern void free_ansi_string(ansi_string *as); … … 142 154 143 155 /* Modifying ansi strings */ 156 ansi_string *real_parse_ansi_string(const char *src) 157 __attribute_malloc__; 144 158 int ansi_string_delete(ansi_string *as, int start, int count); 145 int ansi_string_insert(ansi_string *dst, int loc, 146 ansi_string *src, int start, int count); 147 159 int ansi_string_insert(ansi_string *dst, int loc, ansi_string *src); 148 160 int ansi_string_replace(ansi_string *dst, int loc, int size, 149 ansi_string *src, int start, int count); 161 ansi_string *src); 162 ansi_string *scramble_ansi_string(ansi_string *as); 150 163 void optimize_ansi_string(ansi_string *as); 151 164 1.8.3/trunk/hdrs/extchat.h
r1032 r1117 221 221 extern int save_chatdb(FILE * fp); 222 222 extern void do_cemit 223 (dbref player, const char *name, const char *msg, int noisy);223 (dbref player, const char *name, const char *msg, int flags); 224 224 extern void do_chan_user_flags 225 225 (dbref player, char *name, const char *isyn, int flag, int silent); 1.8.3/trunk/hdrs/externs.h
r1032 r1117 252 252 void shutdown_queues(void); 253 253 254 /* Regexp saving helpers */ 255 struct re_save { 256 struct real_pcre *re_code; /**< The compiled re */ 257 int re_subpatterns; /**< The number of re subpatterns */ 258 int *re_offsets; /**< The offsets for the subpatterns */ 259 struct _ansi_string *re_from; /**< The positions of the subpatterns */ 260 }; 254 261 255 262 /* From create.c */ … … 396 403 397 404 /* From speech.c */ 405 int vmessageformat(dbref player, const char *attribute, 406 dbref executor, int flags, int nargs, ...); 398 407 int messageformat(dbref player, const char *attribute, 399 dbref executor, int flags, const char *arg0,400 const char *arg1, const char *arg2,401 const char *arg3, const char *arg4, const char *arg5);408 dbref executor, int flags, int nargs, char *argv[]); 409 void do_message_list(dbref player, dbref enactor, char *list, char *attrname, 410 char *message, int flags, int numargs, char *argv[]); 402 411 const char *spname(dbref thing); 403 412 void notify_except(dbref first, dbref exception, const char *msg, int flags); … … 591 600 bool quick_regexp_match(const char *restrict s, 592 601 const char *restrict d, bool cs); 602 bool qcomp_regexp_match(const pcre * re, const char *s); 593 603 bool wild_match_case_r(const char *restrict s, 594 604 const char *restrict d, bool cs, … … 620 630 extern char *strip_braces(char const *line); 621 631 632 void save_regexp_context(struct re_save *); 633 void restore_regexp_context(struct re_save *); 622 634 void save_global_regs(const char *funcname, char *preserve[]); 623 635 void restore_global_regs(const char *funcname, char *preserve[]); 1.8.3/trunk/hdrs/extmail.h
r919 r1117 99 99 int silent, int nosig); 100 100 101 /* From bsd.c */102 extern struct mail *desc_mail(dbref player);103 extern void desc_mail_set(dbref player, struct mail *mp);104 extern void desc_mail_clear(void);105 106 101 #endif /* _EXTMAIL_H */ 1.8.3/trunk/hdrs/htab.h
r1032 r1117 4 4 #define __HTAB_H 5 5 6 typedef struct hashtable HASHTAB; 6 7 7 #define HTAB_UPSCALE 3.25 8 #define HTAB_DOWNSCALE 2.0 9 10 typedef struct hashentry HASHENT; 11 /** A hash table entry. 12 */ 13 struct hashentry { 14 struct hashentry *next; /**< Pointer to next entry */ 15 void *data; /**< Data for this entry */ 16 char *key; /**< Key for this entry */ 8 /** Hash table bucket struct */ 9 struct hash_bucket { 10 const char *key; 11 void *data; 17 12 }; 18 13 19 #define HASHENT_SIZE (sizeof(HASHENT))20 21 typedef struct hashtable HASHTAB;22 14 /** A hash table. 23 15 */ 24 16 struct hashtable { 25 int hashsize; /**< Size of hash table */ 26 int mask; /**< Mask for entries in table */ 17 int hashsize; /**< Size of buckets array */ 27 18 int entries; /**< Number of entries stored */ 28 HASHENT **buckets; /**< Pointer to pointer to entries */ 29 int last_hval; /**< State for hashfirst & hashnext. */ 30 HASHENT *last_entry; /**< State for hashfirst & hashnext. */ 31 int entry_size; /**< Size of each entry */ 19 int hashfunc_offset; /**< Which pair of hash functions to use */ 20 struct hash_bucket *buckets; /**< Buckets */ 21 int last_index; /**< State for hashfirst & hashnext. */ 32 22 void (*free_data) (void *); /**< Function to call on data when deleting 33 23 a entry. */ 34 24 }; 35 25 36 #define get_hashmask(x) hash_getmask(x) 37 #define hashinit(x,y, z) hash_init(x,y, z, NULL) 26 typedef struct hash_bucket HASHENT; 27 28 #define hashinit(tab, size) hash_init((tab), (size), NULL) 38 29 #define hashfind(key,tab) hash_value(hash_find(tab,key)) 39 #define hashadd(key,data,tab) hash_add(tab,key,data, 0) 40 #define hashadds(key, data, tab, size) hash_add(tab, key, data, size) 30 #define hashadd(key,data,tab) hash_add(tab,key,data) 41 31 #define hashdelete(key,tab) hash_delete(tab,hash_find(tab,key)) 42 32 #define hashflush(tab, size) hash_flush(tab,size) 43 33 #define hashfree(tab) hash_flush(tab, 0) 44 extern int hash_getmask(int *size); 45 extern void hash_init(HASHTAB *htab, int size, int data_size, void (*)(void *)); 46 extern HASHENT *hash_find(HASHTAB *htab, const char *key); 47 extern void *hash_value(HASHENT *entry); 48 extern char *hash_key(HASHENT *entry); 49 extern void hash_resize(HASHTAB *htab, int size); 50 extern int hash_add 51 (HASHTAB *htab, const char *key, void *hashdata, int extra_size); 52 extern void hash_delete(HASHTAB *htab, HASHENT *entry); 53 extern void hash_flush(HASHTAB *htab, int size); 54 extern void *hash_firstentry(HASHTAB *htab); 55 extern void *hash_nextentry(HASHTAB *htab); 56 extern char *hash_firstentry_key(HASHTAB *htab); 57 extern char *hash_nextentry_key(HASHTAB *htab); 58 extern void hash_stats_header(dbref player); 59 extern void hash_stats(dbref player, HASHTAB *htab, const char *hashname); 34 int hash_getmask(int *size); 35 void hash_init(HASHTAB *htab, int size, void (*)(void *)); 36 HASHENT *hash_find(HASHTAB *htab, const char *key); 37 #define hash_value(entry) (entry) ? (entry)->data : NULL 38 #define hash_key(entry) (entry) ? (entry)->key : NULL 39 bool hash_resize(HASHTAB *htab, int size); 40 bool hash_add(HASHTAB *htab, const char *key, void *hashdata); 41 void hash_delete(HASHTAB *htab, HASHENT *entry); 42 void hash_flush(HASHTAB *htab, int size); 43 void *hash_firstentry(HASHTAB *htab); 44 void *hash_nextentry(HASHTAB *htab); 45 const char *hash_firstentry_key(HASHTAB *htab); 46 const char *hash_nextentry_key(HASHTAB *htab); 47 void hash_stats_header(dbref player); 48 void hash_stats(dbref player, HASHTAB *htab, const char *hashname); 60 49 #endif 1.8.3/trunk/hdrs/mushtype.h
r1032 r1117 137 137 struct descriptor_data *next; /**< Next descriptor in linked list */ 138 138 struct descriptor_data *prev; /**< Previous descriptor in linked list */ 139 struct mail *mailp; /**< Pointer to start of player's mail chain */140 139 int conn_flags; /**< Flags of connection (telnet status, etc.) */ 141 140 unsigned long input_chars; /**< Characters received */ 1.8.3/trunk/hdrs/version.h
r1032 r1117 1 1 #define VERSION "1.8.3" 2 #define PATCHLEVEL " 4"3 #define PATCHDATE "[0 7/9/2007]"4 #define NUMVERSION 100800300 42 #define PATCHLEVEL "5" 3 #define PATCHDATE "[08/27/2007]" 4 #define NUMVERSION 1008003005 1.8.3/trunk/src/access.c
r1032 r1117 78 78 #include "conf.h" 79 79 #include "externs.h" 80 #include "pcre.h" 80 81 #include "access.h" 81 82 #include "mymalloc.h" … … 95 96 struct a_acsflag { 96 97 const char *name; /**< Name of the access flag */ 97 inttoggle; /**< Is this a negatable flag? */98 int flag; /**< Bitmask of the flag */98 bool toggle; /**< Is this a negatable flag? */ 99 uint32_t flag; /**< Bitmask of the flag */ 99 100 }; 100 101 static acsflag acslist[] = { … … 114 115 115 116 static struct access *access_top; 116 static int add_access_node117 (const char *host, const dbref who, const int can, const int cant,118 const char *comment);119 117 static void free_access_list(void); 120 118 121 static int 122 add_access_node(const char *host, const dbref who, const int can, 123 const int cant, const char *comment) 124 { 125 struct access *end; 119 extern const unsigned char *tables; 120 121 static struct access * 122 sitelock_alloc(const char *host, dbref who, 123 uint32_t can, uint32_t cant, 124 const char *comment, const char **errptr) 125 __attribute_malloc__; 126 127 static struct access *sitelock_alloc(const char *host, dbref who, 128 uint32_t can, uint32_t cant, 129 const char *comment, 130 const char **errptr) 131 { 126 132 struct access *tmp; 127 128 tmp = (struct access *) mush_malloc(sizeof(struct access), "struct_access"); 129 if (!tmp) 130 return 0; 133 tmp = mush_malloc(sizeof(struct access), "sitelock.rule"); 134 if (!tmp) { 135 static const char *memerr = "unable to allocate memory"; 136 if (errptr) 137 *errptr = memerr; 138 return NULL; 139 } 131 140 tmp->who = who; 132 141 tmp->can = can; 133 142 tmp->cant = cant; 134 strcpy(tmp->host, host);143 mush_strncpy(tmp->host, host, BUFFER_LEN); 135 144 if (comment) 136 strcpy(tmp->comment, comment);145 mush_strncpy(tmp->comment, comment, BUFFER_LEN); 137 146 else 138 147 tmp->comment[0] = '\0'; 139 148 tmp->next = NULL; 149 150 if (can & ACS_REGEXP) { 151 int erroffset = 0; 152 tmp->re = pcre_compile(host, 0, errptr, &erroffset, tables); 153 if (!tmp->re) { 154 mush_free(tmp, "sitelock.rule"); 155 return NULL; 156 } 157 } else 158 tmp->re = NULL; 159 160 return tmp; 161 } 162 163 static bool 164 add_access_node(const char *host, dbref who, uint32_t can, 165 uint32_t cant, const char *comment, const char **errptr) 166 { 167 struct access *end, *tmp;&nb
