PennMUSH Community

Changeset 1117

Show
Ignore:
Timestamp:
10/05/07 15:36:32 (11 months ago)
Author:
shawnw
Message:

Merge with devel

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/trunk/CHANGES.182

    r1108 r1117  
    1414========================================================================== 
    1515 
    16 Version 1.8.2 patchlevel 7                     August 27, 2007 
     16Version 1.8.2 patchlevel 7                       Aug 27, 2007 
    1717 
    1818Minor changes: 
     
    3131    compression algorithm. Any will work, and always have. 
    3232    Reported by Andrew Klein. 
    33   * Crash bug in @purge. Javelin.   
    3433 
    3534Version 1.8.2 patchlevel 6                       July 9, 2007 
  • 1.8.3/trunk/CHANGES.183

    r1036 r1117  
    1515========================================================================== 
    1616 
    17 Version 1.8.3 patchlevel 4                      ???? ??, 2007 
     17Version 1.8.3 patchlevel 5                      August 27, 2007 
     18 
     19Major 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 
     25Minor 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 
     35Commands: 
     36 * Added @message, which makes it easy to use @chatformat or 
     37   @pageformat via @hooks, or to create your own *format. 
     38 
     39Functions: 
     40 * Added message(), the function version of @message. 
     41 
     42Fixes: 
     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 
     53Version 1.8.3 patchlevel 4                      July 9, 2007 
    1854 
    1955Major changes: 
  • 1.8.3/trunk/MANIFEST

    r1032 r1117  
    234234src/wild.c 
    235235src/wiz.c 
     236test/README 
    236237test/MUSHConnection.pm 
    237238test/PennMUSH.pm 
    238239test/TestHarness.pm 
    239 test/alltests.pl 
     240test/alltests.sh.in 
     241test/runtest.pl 
    240242test/testalias.pl 
    241243test/testatree.pl 
     
    257259test/teststringsecs.pl 
    258260test/testtr.pl 
     261test/testtrim.pl 
    259262utils/clwrapper.sh 
    260263utils/customize.pl 
  • 1.8.3/trunk/Makefile.in

    r1039 r1117  
    44 
    55VERSION=1.8.3 
    6 PATCHLEVEL=4 
     6PATCHLEVEL=5 
    77 
    88# 
     
    8181netmud:  
    8282    (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ 
     83    "SQL_CFLAGS=$(SQL_CFLAGS)" "SQL_LDFLAGS=$(SQL_LDFLAGS)" \ 
    8384    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" ) 
    8485 
     
    163164update-hdr: 
    164165    -@@TOUCH@ options.h.dist 
     166    -@sleep 2 
    165167    -@@PERL@ utils/update.pl options.h options.h.dist 
    166168 
  • 1.8.3/trunk/Patchlevel

    r1032 r1117  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.8.3p4 
     2This is PennMUSH 1.8.3p5 
  • 1.8.3/trunk/UPGRADING

    r1032 r1117  
    119119*** target version of PennMUSH. PennMUSH 1.7.7+ can no longer read 
    120120*** 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. 
    121126 
    122127============================================================================ 
  • 1.8.3/trunk/configure

    r1032 r1117  
    1794417944ac_config_files="$ac_config_files game/txt/compose.sh" 
    1794517945 
     17946ac_config_files="$ac_config_files test/alltests.sh" 
     17947 
    1794617948cat >confcache <<\_ACEOF 
    1794717949# This file is a shell script that caches the results of configure 
     
    1848818490    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; 
    1848918491    "game/txt/compose.sh") CONFIG_FILES="$CONFIG_FILES game/txt/compose.sh" ;; 
     18492    "test/alltests.sh") CONFIG_FILES="$CONFIG_FILES test/alltests.sh" ;; 
    1849018493 
    1849118494  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 
     
    1903419037  case $ac_file$ac_mode in 
    1903519038    "game/txt/compose.sh":F) chmod +x game/txt/compose.sh ;; 
     19039    "test/alltests.sh":F) chmod +x test/alltests.sh ;; 
    1903619040 
    1903719041  esac 
  • 1.8.3/trunk/configure.in

    r1032 r1117  
    288288AC_CONFIG_FILES([Makefile src/Makefile]) 
    289289AC_CONFIG_FILES([game/txt/compose.sh], [chmod +x game/txt/compose.sh]) 
     290AC_CONFIG_FILES([test/alltests.sh], [chmod +x test/alltests.sh]) 
    290291AC_OUTPUT 
  • 1.8.3/trunk/game/txt/hlp/penncmd.hlp

    r1084 r1117  
    457457 
    458458  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! 
    460462  > 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! 
    465468 
    466469  > @force me={@switch 1=1, think Third; think First; @break 1; think Second} 
     
    22142217  Object says, "2" 
    22152218  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 
     2238See also: message(), @chatformat, @pageformat 
    22162239& @motd 
    22172240  @motd [/<switch>] [<message>].   
     
    26122635  %2 will be set to the alias of the pager, if any. 
    26132636  %3 will be a space-separated list of recipient dbrefs. 
     2637  %4 will be set to the default message. 
    26142638 
    26152639  To obtain 'page_aliases' behavior: 
  • 1.8.3/trunk/game/txt/hlp/pennfunc.hlp

    r1032 r1117  
    12341234  get_eval(<object>/<attribute>) 
    12351235  
    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. 
    12411243 
    12421244    Example: 
     
    20012003See also: capstr(), ucstr() 
    20022004& LDELETE() 
    2003   Ldelete(<list>, <position>[,<single-character separator>]) 
    2004    
    2005   This deletes the item at <position> in the list. If a separator 
     2005  Ldelete(<list>, <position(s)>[,<single-character separator>]) 
     2006   
     2007  This deletes the item(s) at <position(s)> in the list. If a separator 
    20062008  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. 
    20082011   
    20092012  Examples: 
     
    25362539 
    25372540See also: splice(), tr()   
     2541& MESSAGE() 
     2542  message(<player list>, <message>, <attribute>[,<arg1>,...]) 
     2543 
     2544  message() is the function form of @message. 
    25382545& MID() 
    25392546  mid(<string>, <first>, <length>) 
     
    28182825  will have this dbref. 
    28192826 
    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 suitable 
    2825   for use on privileged global objects who need an unprivileged count 
    2826   of who's online. 
    2827  
    2828 See also: nwho(), mwho(), xmwho() 
    28292827& NOR() 
    28302828  nor(<boolean>[, ... , <booleanN>]) 
     
    28952893 
    28962894See also: ncon(), nexits(), xthings(), lthings(), lvthings() 
     2895& NMWHO() 
    28972896& NWHO() 
    28982897  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 
    29012902  mortals use this function, DARK wizards or royalty are NOT counted. 
    29022903 
    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 
     2913See also: lwho(), mwho(), xwho(), xmwho() 
    29042914& OBJ() 
    29052915  obj(<object>) 
  • 1.8.3/trunk/game/txt/hlp/pennv182.hlp

    r1036 r1117  
     1& 1.8.2p7 
     2Version 1.8.2 patchlevel 7                       Aug  27, 2007 
     3 
     4Minor changes: 
     5  * nwho() now takes an optional viewer argument like lwho(). 
     6 
     7Fixes: 
     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 
    120& 1.8.2p6 
    221Version 1.8.2 patchlevel 6                       July 9, 2007 
  • 1.8.3/trunk/game/txt/hlp/pennv183.hlp

    r1036 r1117  
    1 & 1.8.3p4 
     1& 1.8.3p5 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
    14 Version 1.8.3 patchlevel 4                      ???? ??, 2007 
     14Version 1.8.3 patchlevel 5                      August 27, 2007 
     15 
     16Major 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 
     22Minor 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 
     32Commands: 
     33 * Added @message, which makes it easy to use @chatformat or 
     34   @pageformat via @hooks, or to create your own *format. 
     35 
     36Functions: 
     37 * Added message(), the function version of @message. 
     38 
     39Fixes: 
     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 
     51Version 1.8.3 patchlevel 4                      July 9, 2007 
    1552 
    1653Major changes: 
  • 1.8.3/trunk/game/txt/hlp/pennvOLD.hlp

    r1032 r1117  
    44184418type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 
    44194419 
    4420 1.8.3: 0, 1, 2, 3, 4 
    4421 1.8.2: 0, 1, 2, 3, 4, 5, 6 
     44201.8.3: 0, 1, 2, 3, 4, 5 
     44211.8.2: 0, 1, 2, 3, 4, 5, 6, 7 
    442244221.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 
    442344231.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  
    1010  char comment[BUFFER_LEN];     /**< A comment about the rule */ 
    1111  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 */ 
    1415  struct access *next;          /**< Pointer to next rule in the list */ 
    1516}; 
     
    1718 
    1819/* 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 */ 
    2324/* 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 */ 
    2829 
    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 */ 
    3233 
    3334/* This is the usual default access */ 
     
    4546 
    4647/* Public functions */ 
    47 int read_access_file(void); 
     48bool read_access_file(void); 
    4849void write_access_file(void); 
    49 int site_can_access(const char *hname, int flag, dbref who); 
     50bool site_can_access(const char *hname, uint32_t flag, dbref who); 
    5051struct access *site_check_access(const char *hname, dbref who, int *rulenum); 
    51 int format_access(struct access *ap, int rulenum, 
    52                   dbref who 
    53                   __attribute__ ((__unused__)), char *buff, char **bp); 
    54 int add_access_sitelock(dbref player, const char *host, dbref who, int can
    55                         int cant); 
     52void format_access(struct access *ap, int rulenum, 
     53                  dbref who 
     54                  __attribute__ ((__unused__)), char *buff, char **bp); 
     55bool add_access_sitelock(dbref player, const char *host, dbref who
     56                        uint32_t can, uint32_t cant); 
    5657int remove_access_sitelock(const char *pattern); 
    5758void do_list_access(dbref player); 
    5859int 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); 
    6061 
    6162#endif                          /* __ACCESS_H */ 
  • 1.8.3/trunk/hdrs/ansi.h

    r1032 r1117  
    2222#define BEEP_CHAR     '\a' 
    2323#define ESC_CHAR      '\x1B' 
     24 
     25#define ANSI_RAW_NORMAL "\x1B[0m" 
    2426 
    2527#define TAG_START     '\002' 
     
    8183#endif 
    8284 
    83 struct ansi_data { 
     85typedef struct _ansi_data { 
    8486  uint8_t bits; 
    8587  uint8_t offbits; 
    8688  char fore; 
    8789  char back; 
    88 }
     90} ansi_data
    8991 
    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); 
     92int read_raw_ansi_data(ansi_data * store, const char *codes); 
     93int write_raw_ansi_data(ansi_data * old, ansi_data * cur, char *buff, 
     94                        char **bp); 
    9295 
    93 int write_raw_ansi_data(struct ansi_data *old, struct ansi_data *cur, 
    94                         char *buff, char **bp); 
     96void define_ansi_data(ansi_data * store, const char *str); 
     97int write_ansi_data(ansi_data * cur, char *buff, char **bp); 
    9598 
    9699 
    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); 
     100void nest_ansi_data(ansi_data * old, ansi_data * cur); 
    99101 
    100102#define MARKUP_COLOR 'c' 
     
    105107 
    106108/* 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 
    107121typedef struct _markup_information { 
    108122  char *start_code; 
    109123  char *stop_code; 
    110   struct ansi_data ansi; 
    111124  char type; 
    112125  int start; 
     
    118131typedef struct _ansi_string { 
    119132  char text[BUFFER_LEN];        /**< Text of the string */ 
     133  ansi_data ansi[BUFFER_LEN];   /**< ANSI of the string */ 
    120134  markup_information markup[BUFFER_LEN]; /**< The markup_information list */ 
    121   int nmarkups; 
     135  int nmarkups;         /**< Number of Pueblo markups */ 
    122136  int len;              /**< Length of text */ 
    123   int optimized;              /**< Has this ansi-string been optimized? */ 
     137  int optimized;              /**< Has this ansi_string been optimized? */ 
    124138} ansi_string; 
    125139 
     
    131145parse_ansi_string(const char *src) 
    132146  __attribute_malloc__; 
    133     extern ansi_string *parse_ansi_string_real(const char *src, int oldstyle) 
    134  __attribute_malloc__; 
    135147    extern void flip_ansi_string(ansi_string *as); 
    136148    extern void free_ansi_string(ansi_string *as); 
     
    142154 
    143155/* Modifying ansi strings */ 
     156    ansi_string *real_parse_ansi_string(const char *src) 
     157 __attribute_malloc__; 
    144158    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); 
    148160    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); 
    150163    void optimize_ansi_string(ansi_string *as); 
    151164 
  • 1.8.3/trunk/hdrs/extchat.h

    r1032 r1117  
    221221extern int save_chatdb(FILE * fp); 
    222222extern 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); 
    224224extern void do_chan_user_flags 
    225225  (dbref player, char *name, const char *isyn, int flag, int silent); 
  • 1.8.3/trunk/hdrs/externs.h

    r1032 r1117  
    252252void shutdown_queues(void); 
    253253 
     254/* Regexp saving helpers */ 
     255struct 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}; 
    254261 
    255262/* From create.c */ 
     
    396403 
    397404/* From speech.c */ 
     405int vmessageformat(dbref player, const char *attribute, 
     406                   dbref executor, int flags, int nargs, ...); 
    398407int 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[]); 
     409void do_message_list(dbref player, dbref enactor, char *list, char *attrname
     410                     char *message, int flags, int numargs, char *argv[]); 
    402411const char *spname(dbref thing); 
    403412void notify_except(dbref first, dbref exception, const char *msg, int flags); 
     
    591600    bool quick_regexp_match(const char *restrict s, 
    592601                            const char *restrict d, bool cs); 
     602    bool qcomp_regexp_match(const pcre * re, const char *s); 
    593603    bool wild_match_case_r(const char *restrict s, 
    594604                           const char *restrict d, bool cs, 
     
    620630    extern char *strip_braces(char const *line); 
    621631 
     632    void save_regexp_context(struct re_save *); 
     633    void restore_regexp_context(struct re_save *); 
    622634    void save_global_regs(const char *funcname, char *preserve[]); 
    623635    void restore_global_regs(const char *funcname, char *preserve[]); 
  • 1.8.3/trunk/hdrs/extmail.h

    r919 r1117  
    9999   int silent, int nosig); 
    100100 
    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  
    106101#endif                          /* _EXTMAIL_H */ 
  • 1.8.3/trunk/hdrs/htab.h

    r1032 r1117  
    44#define __HTAB_H 
    55 
     6typedef struct hashtable HASHTAB; 
    67 
    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 */ 
     9struct hash_bucket { 
     10  const char *key; 
     11  void *data; 
    1712}; 
    1813 
    19 #define HASHENT_SIZE (sizeof(HASHENT)) 
    20  
    21 typedef struct hashtable HASHTAB; 
    2214/** A hash table. 
    2315 */ 
    2416struct hashtable { 
    25   int hashsize;                 /**< Size of hash table */ 
    26   int mask;                     /**< Mask for entries in table */ 
     17  int hashsize;                 /**< Size of buckets array */ 
    2718  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. */ 
    3222  void (*free_data) (void *);   /**< Function to call on data when deleting 
    3323                                   a entry. */ 
    3424}; 
    3525 
    36 #define get_hashmask(x) hash_getmask(x) 
    37 #define hashinit(x,y, z) hash_init(x,y, z, NULL) 
     26typedef struct hash_bucket HASHENT; 
     27 
     28#define hashinit(tab, size) hash_init((tab), (size), NULL) 
    3829#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) 
    4131#define hashdelete(key,tab) hash_delete(tab,hash_find(tab,key)) 
    4232#define hashflush(tab, size) hash_flush(tab,size) 
    4333#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); 
     34int hash_getmask(int *size); 
     35void hash_init(HASHTAB *htab, int size, void (*)(void *)); 
     36HASHENT *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 
     39bool hash_resize(HASHTAB *htab, int size); 
     40bool hash_add(HASHTAB *htab, const char *key, void *hashdata); 
     41void hash_delete(HASHTAB *htab, HASHENT *entry); 
     42void hash_flush(HASHTAB *htab, int size); 
     43void *hash_firstentry(HASHTAB *htab); 
     44void *hash_nextentry(HASHTAB *htab); 
     45const char *hash_firstentry_key(HASHTAB *htab); 
     46const char *hash_nextentry_key(HASHTAB *htab); 
     47void hash_stats_header(dbref player); 
     48void hash_stats(dbref player, HASHTAB *htab, const char *hashname); 
    6049#endif 
  • 1.8.3/trunk/hdrs/mushtype.h

    r1032 r1117  
    137137  struct descriptor_data *next; /**< Next descriptor in linked list */ 
    138138  struct descriptor_data *prev; /**< Previous descriptor in linked list */ 
    139   struct mail *mailp;   /**< Pointer to start of player's mail chain */ 
    140139  int conn_flags;       /**< Flags of connection (telnet status, etc.) */ 
    141140  unsigned long input_chars;    /**< Characters received */ 
  • 1.8.3/trunk/hdrs/version.h

    r1032 r1117  
    11#define VERSION "1.8.3" 
    2 #define PATCHLEVEL "4
    3 #define PATCHDATE "[07/9/2007]" 
    4 #define NUMVERSION 1008003004 
     2#define PATCHLEVEL "5
     3#define PATCHDATE "[08/27/2007]" 
     4#define NUMVERSION 1008003005 
  • 1.8.3/trunk/src/access.c

    r1032 r1117  
    7878#include "conf.h" 
    7979#include "externs.h" 
     80#include "pcre.h" 
    8081#include "access.h" 
    8182#include "mymalloc.h" 
     
    9596struct a_acsflag { 
    9697  const char *name;             /**< Name of the access flag */ 
    97   int toggle;                   /**< 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 */ 
    99100}; 
    100101static acsflag acslist[] = { 
     
    114115 
    115116static struct access *access_top; 
    116 static int add_access_node 
    117   (const char *host, const dbref who, const int can, const int cant, 
    118    const char *comment); 
    119117static void free_access_list(void); 
    120118 
    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; 
     119extern const unsigned char *tables; 
     120 
     121static struct access * 
     122sitelock_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
    126132  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  } 
    131140  tmp->who = who; 
    132141  tmp->can = can; 
    133142  tmp->cant = cant; 
    134   strcpy(tmp->host, host); 
     143  mush_strncpy(tmp->host, host, BUFFER_LEN); 
    135144  if (comment) 
    136     strcpy(tmp->comment, comment); 
     145    mush_strncpy(tmp->comment, comment, BUFFER_LEN); 
    137146  else 
    138147    tmp->comment[0] = '\0'; 
    139148  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 
     163static bool 
     164add_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