PennMUSH Community

Changeset 465

Show
Ignore:
Timestamp:
08/16/06 01:12:13 (2 years ago)
Author:
pennmush
Message:

PennMUSH 1.7.7p33 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.7.7/CHANGES.177

    r463 r465  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 33                     June 3, 2004 
     22 
     23Minor changes (internals): 
     24  * IsPlayer, etc. macros rewritten for clarity by Luke@M*U*S*H. 
     25  * Use enums in place of some more #defines and magic numbers. [SW] 
     26  * New did_it_with() hc function simplifies passing a dbref as %0 
     27    to did_it actions. [SW] 
     28Fixes: 
     29  * The SQL_OK power could get double-added. If this happened to you, 
     30    delete one of them and double-check that all sql-using objects 
     31    still have the power set. Report by Mordie@M*U*S*H. 
     32  * Missing include in game.c fixed. 
     33  * Improper include in bufferq.c fixed. Report by Leona and Walker@M*U*S*H. 
     34  * Obsolete bzero() uses removed. [SW] 
     35  * New win32/pennmush.dsp. 
     36  * Help fix by bleeder@M*U*S*H. 
     37  * Mac OS X linting [SW]. 
     38 
    2039 
    2140Version 1.7.7 patchlevel 32                     May 26, 2004 
  • 1.7.7/Patchlevel

    r463 r465  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.7.7p32 
     2This is PennMUSH 1.7.7p33 
  • 1.7.7/game/txt/hlp/penncmd.hlp

    r463 r465  
    26442644    or 'exit'. It defaults to 'any'.  
    26452645  <setperms> specifies the space-separated list of permissions for who can 
    2646     set and/or see the power. See 'help power permissions' for details. 
     2646    set and/or see the power. See 'help flag permissions' for details. 
    26472647    It defaults to 'any' 
    26482648  <unsetperms> specifies the space-separated list of permissions for who 
  • 1.7.7/game/txt/hlp/pennv177.hlp

    r463 r465  
    1 & 1.7.7p32 
     1& 1.7.7p33 
    22& changes 
    33This is a list of changes in this patchlevel which are probably of 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.7.7 patchlevel 33                     June 3, 2004 
     15 
     16Minor changes (internals): 
     17  * IsPlayer, etc. macros rewritten for clarity by Luke@M*U*S*H. 
     18  * Use enums in place of some more #defines and magic numbers. [SW] 
     19  * New did_it_with() hc function simplifies passing a dbref as %0 
     20    to did_it actions. [SW] 
     21Fixes: 
     22  * The SQL_OK power could get double-added. If this happened to you, 
     23    delete one of them and double-check that all sql-using objects 
     24    still have the power set. Report by Mordie@M*U*S*H. 
     25  * Missing include in game.c fixed. 
     26  * Improper include in bufferq.c fixed. Report by Leona and Walker@M*U*S*H. 
     27  * Obsolete bzero() uses removed. [SW] 
     28  * New win32/pennmush.dsp. 
     29  * Help fix by bleeder@M*U*S*H. 
     30  * Mac OS X linting [SW]. 
     31 
     32 
     33& 1.7.7p32 
    1434Version 1.7.7 patchlevel 32                     May 26, 2004 
    1535 
  • 1.7.7/game/txt/hlp/pennvOLD.hlp

    r463 r465  
    44194419 
    442044201.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    4421        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 
     4421       19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 
    442244221.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 
    442344231.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 
  • 1.7.7/hdrs/chunk.h

    r445 r465  
    2323int chunk_num_swapped(void); 
    2424void chunk_init(void); 
    25 void chunk_stats(dbref player, int which); 
     25enum chunk_stats_type { CSTATS_SUMMARY, CSTATS_REGIONG, CSTATS_PAGINGG, 
     26  CSTATS_FREESPACEG, CSTATS_REGION, CSTATS_PAGING 
     27}; 
     28void chunk_stats(dbref player, enum chunk_stats_type which); 
    2629void chunk_new_period(void); 
    2730 
  • 1.7.7/hdrs/command.h

    r463 r465  
    77#define SW_CLR(m,n)     (m[(n) >> 3] &= ~(1 << ((n) & 0x7))) 
    88#define SW_ISSET(m,n)   (m[(n) >> 3] & (1 << ((n) & 0x7))) 
    9 #define SW_ZERO(m)      bzero(m, NUM_BYTES) 
     9#define SW_ZERO(m)      memset(m, 0, NUM_BYTES) 
    1010 
    1111/* These are type restrictors */ 
  • 1.7.7/hdrs/dbdefs.h

    r463 r465  
    6363 
    6464/* Check for a specific one */ 
    65 #define IsPlayer(x)     (!!(Typeof(x) & TYPE_PLAYER)
    66 #define IsRoom(x)       (!!(Typeof(x) & TYPE_ROOM)
    67 #define IsThing(x)      (!!(Typeof(x) & TYPE_THING)
    68 #define IsExit(x)       (!!(Typeof(x) & TYPE_EXIT)
     65#define IsPlayer(x)     ((Typeof(x) & TYPE_PLAYER) == TYPE_PLAYER
     66#define IsRoom(x)       ((Typeof(x) & TYPE_ROOM) == TYPE_ROOM
     67#define IsThing(x)      ((Typeof(x) & TYPE_THING) == TYPE_THING
     68#define IsExit(x)       ((Typeof(x) & TYPE_EXIT) == TYPE_EXIT
    6969/* Was Destroyed() */ 
    70 #define IsGarbage(x)    (!!(Typeof(x) & TYPE_GARBAGE)
    71 #define Marked(x)       (!!(db[(x)].type & TYPE_MARKED)
     70#define IsGarbage(x)    ((Typeof(x) & TYPE_GARBAGE) == TYPE_GARBAGE
     71#define Marked(x)       ((db[(x)].type & TYPE_MARKED) == TYPE_MARKED
    7272 
    7373#define IS(thing,type,flag) \ 
  • 1.7.7/hdrs/extchat.h

    r463 r465  
    205205 
    206206     /* For use in channel matching */ 
    207 #define CMATCH_NONE 0 
    208 #define CMATCH_EXACT 1 
    209 #define CMATCH_PARTIAL 2 
    210 #define CMATCH_AMBIG 3 
     207enum cmatch_type { CMATCH_NONE, CMATCH_EXACT, CMATCH_PARTIAL, CMATCH_AMBIG }; 
    211208#define CMATCHED(i) (((i) == CMATCH_EXACT) | ((i) == CMATCH_PARTIAL)) 
    212209 
     
    239236extern void do_chan_admin 
    240237  (dbref player, char *name, const char *perms, int flag); 
    241 extern int find_channel(const char *p, CHAN **chan, dbref player); 
    242 extern int find_channel_partial(const char *p, CHAN **chan, dbref player); 
     238extern enum cmatch_type find_channel(const char *p, CHAN **chan, dbref player); 
     239extern enum cmatch_type find_channel_partial(const char *p, CHAN **chan, 
     240                         dbref player); 
    243241extern void do_channel_list(dbref player, const char *partname); 
    244242extern int do_chat_by_name 
  • 1.7.7/hdrs/externs.h

    r463 r465  
    291291          const char *def, const char *owhat, const char *odef, 
    292292          const char *awhat, dbref loc); 
     293extern int did_it_with(dbref player, dbref thing, const char *what, 
     294               const char *def, const char *owhat, const char *odef, 
     295               const char *awhat, dbref loc, dbref env0, dbref env1, 
     296               int flags); 
    293297extern int did_it_interact(dbref player, dbref thing, const char *what, 
    294298               const char *def, const char *owhat, 
  • 1.7.7/hdrs/extmail.h

    r459 r465  
    8282extern int mdb_top; 
    8383extern void do_mail(dbref player, char *arg1, char *arg2); 
    84 extern void do_mail_stats(dbref player, char *name, int full); 
     84enum mail_stats_type { MSTATS_COUNT, MSTATS_READ, MSTATS_SIZE }; 
     85extern void do_mail_stats(dbref player, char *name, enum mail_stats_type full); 
    8586extern void do_mail_debug(dbref player, const char *action, const char *victim); 
    8687extern void do_mail_nuke(dbref player); 
  • 1.7.7/hdrs/game.h

    r463 r465  
    3232extern void do_wait 
    3333  (dbref player, dbref cause, char *arg1, char *cmd, int until); 
    34 extern void do_queue(dbref player, const char *what, int flag); 
     34enum queue_type { QUEUE_ALL, QUEUE_NORMAL, QUEUE_SUMMARY, QUEUE_QUICK }; 
     35extern void do_queue(dbref player, const char *what, enum queue_type flag); 
    3536extern void do_halt1(dbref player, const char *arg1, const char *arg2); 
    3637extern void do_allhalt(dbref player); 
     
    6364 
    6465/* From look.c */ 
    65 extern void do_examine(dbref player, const char *name, int brief, int all); 
     66enum exam_type { EXAM_NORMAL, EXAM_BRIEF, EXAM_MORTAL }; 
     67extern void do_examine(dbref player, const char *name, enum exam_type flag, 
     68               int all); 
    6669extern void do_inventory(dbref player); 
    6770extern void do_find(dbref player, const char *name, char **argv); 
     
    160163extern void do_newpassword 
    161164  (dbref player, const char *name, const char *password); 
    162 extern void do_boot(dbref player, const char *name, int flag); 
     165enum boot_type { BOOT_NAME, BOOT_DESC, BOOT_SELF }; 
     166extern void do_boot(dbref player, const char *name, enum boot_type flag); 
    163167extern void do_chzoneall(dbref player, const char *name, const char *target); 
    164168extern int force_by_number(dbref player, char *command); 
  • 1.7.7/hdrs/version.h

    r463 r465  
    1 #define VERSION "PennMUSH version 1.7.7 patchlevel 31 [05/26/2004]" 
    2 #define SHORTVN "PennMUSH 1.7.7p32" 
    3 #define NUMVERSION 001007007032 
     1#define VERSION "1.7.7" 
     2#define PATCHLEVEL "33" 
     3#define PATCHDATE "[06/03/2004]" 
     4#define NUMVERSION 001007007033 
  • 1.7.7/hints/darwin.sh

    r275 r465  
    11usenm="n" 
    22cdecl='' 
    3 d_attribut='undef' 
     3 
  • 1.7.7/src/bsd.c

    r463 r465  
    16711671/* ARGSUSED */ 
    16721672static DESC * 
    1673 initializesock(int s, char *addr, char *ip, int use_ssl) 
     1673initializesock(int s, char *addr, char *ip, int use_ssl 
     1674           __attribute__ ((__unused__))) 
    16741675{ 
    16751676  DESC *d; 
     
    25582559/* ARGSUSED */ 
    25592560static int 
    2560 process_input(DESC *d, int output_ready
     2561process_input(DESC *d, int output_ready __attribute__ ((__unused__))
    25612562{ 
    25622563  int got = 0; 
     
    33873388  queue_string_eol(call_by, tprintf("Connected: %d", count)); 
    33883389  queue_string_eol(call_by, tprintf("Size: %d", db_top)); 
    3389   queue_string_eol(call_by, tprintf("Version: %s", SHORTVN)); 
     3390  queue_string_eol(call_by, tprintf("Version: %sp%s", VERSION, PATCHLEVEL)); 
    33903391#ifdef PATCHES 
    33913392  queue_string_eol(call_by, tprintf("Patches: %s", PATCHES)); 
  • 1.7.7/src/bufferq.c

    r463 r465  
    1717#include <stddef.h> 
    1818#include <stdarg.h> 
     19#include <stdlib.h> 
    1920#ifdef I_SYS_TIME 
    2021#include <sys/time.h> 
     
    2425#include <sys/types.h> 
    2526#endif 
    26 #include <malloc.h> 
    2727 
    2828#include "conf.h" 
     
    3131#include "dbdefs.h" 
    3232#include "bufferq.h" 
     33#include "mymalloc.h" 
    3334#include "log.h" 
    3435#include "confmagic.h" 
  • 1.7.7/src/chunk.c

    r463 r465  
    220220 
    221221#include <string.h> 
     222#include <stdlib.h> 
    222223 
    223224#include <fcntl.h> 
     
    26292630 * Display either the statistics summary or one of the histograms. 
    26302631 * \param player the player to display it to, or NOTHING to log it. 
    2631  * \param which 0 for the summary, 1 for the region histogram, 
    2632  * 2 for the paging histogram, or 3 for the freespace histogram, 
    2633  * 4 for the region stats, 5 for the paging counts. 
     2632 * \param which what type of information to display. 
    26342633 */ 
    26352634void 
    2636 chunk_stats(dbref player, int which) 
     2635chunk_stats(dbref player, enum chunk_stats_type which) 
    26372636{ 
    26382637  switch (which) { 
    2639   case 0
     2638  case CSTATS_SUMMARY
    26402639    chunk_statistics(player); 
    26412640    break; 
    2642   case 1
     2641  case CSTATS_REGIONG
    26432642    chunk_histogram(player, chunk_regionhist(), 
    26442643            "Chart number of regions (y) vs. references (x)"); 
    26452644    break; 
    2646   case 2
     2645  case CSTATS_PAGINGG
    26472646    chunk_histogram(player, stat_paging_histogram, 
    26482647            "Chart pages in/out (y) vs. references (x)"); 
    26492648    break; 
    2650   case 3
     2649  case CSTATS_FREESPACEG
    26512650    chunk_histogram(player, chunk_freehist(), 
    26522651            "Chart region free space (y) vs. references (x)"); 
    26532652    break; 
    2654   case 4
     2653  case CSTATS_REGION
    26552654    chunk_region_statistics(player); 
    26562655    break; 
    2657   case 5
     2656  case CSTATS_PAGING
    26582657    chunk_page_stats(player); 
    26592658    break; 
  • 1.7.7/src/cmds.c

    r463 r465  
    8484COMMAND (cmd_boot) { 
    8585  if (SW_ISSET(sw, SWITCH_PORT)) 
    86     do_boot(player, arg_left, 1); 
     86    do_boot(player, arg_left, BOOT_DESC); 
    8787  else if (SW_ISSET(sw, SWITCH_ME)) 
    88     do_boot(player, (char *) NULL, 2); 
    89   else 
    90     do_boot(player, arg_left, 0); 
     88    do_boot(player, (char *) NULL, BOOT_SELF); 
     89  else 
     90    do_boot(player, arg_left, BOOT_NAME); 
    9191} 
    9292 
     
    159159 
    160160COMMAND (cmd_create) { 
    161   do_create(player, arg_left, atol(arg_right)); 
     161  do_create(player, arg_left, parse_integer(arg_right)); 
    162162} 
    163163 
     
    474474  /* First, mail commands that can be used even if you're gagged */ 
    475475  if (SW_ISSET(sw, SWITCH_STATS)) 
    476     do_mail_stats(player, arg_left, 0); 
     476    do_mail_stats(player, arg_left, MSTATS_COUNT); 
    477477  else if (SW_ISSET(sw, SWITCH_DSTATS)) 
    478     do_mail_stats(player, arg_left, 1); 
     478    do_mail_stats(player, arg_left, MSTATS_READ); 
    479479  else if (SW_ISSET(sw, SWITCH_FSTATS)) 
    480     do_mail_stats(player, arg_left, 2); 
     480    do_mail_stats(player, arg_left, MSTATS_SIZE); 
    481481  else if (SW_ISSET(sw, SWITCH_DEBUG)) 
    482482    do_mail_debug(player, arg_left, arg_right); 
     
    671671COMMAND (cmd_ps) { 
    672672  if (SW_ISSET(sw, SWITCH_ALL)) 
    673     do_queue(player, arg_left, 1); 
     673    do_queue(player, arg_left, QUEUE_ALL); 
    674674  else if (SW_ISSET(sw, SWITCH_SUMMARY) || SW_ISSET(sw, SWITCH_COUNT)) 
    675     do_queue(player, arg_left, 2); 
     675    do_queue(player, arg_left, QUEUE_SUMMARY); 
    676676  else if (SW_ISSET(sw, SWITCH_QUICK)) 
    677     do_queue(player, arg_left, 3); 
    678   else 
    679     do_queue(player, arg_left, 0); 
     677    do_queue(player, arg_left, QUEUE_QUICK); 
     678  else 
     679    do_queue(player, arg_left, QUEUE_NORMAL); 
    680680} 
    681681 
     
    793793  else if (SW_ISSET(sw, SWITCH_CHUNKS)) { 
    794794    if (SW_ISSET(sw, SWITCH_REGIONS)) 
    795       chunk_stats(player, 4); 
     795      chunk_stats(player, CSTATS_REGION); 
    796796    else 
    797       chunk_stats(player, 0); 
     797      chunk_stats(player, CSTATS_SUMMARY); 
    798798  } else if (SW_ISSET(sw, SWITCH_REGIONS)) 
    799     chunk_stats(player, 1); 
     799    chunk_stats(player, CSTATS_REGIONG); 
    800800  else if (SW_ISSET(sw, SWITCH_PAGING)) 
    801     chunk_stats(player, 2); 
     801    chunk_stats(player, CSTATS_PAGINGG); 
    802802  else if (SW_ISSET(sw, SWITCH_FREESPACE)) 
    803     chunk_stats(player, 3); 
     803    chunk_stats(player, CSTATS_FREESPACEG); 
    804804  else 
    805805    do_stats(player, arg_left); 
     
    919919 
    920920COMMAND (cmd_brief) { 
    921   do_examine(player, arg_left, 1, 0); 
     921  do_examine(player, arg_left, EXAM_BRIEF, 0); 
    922922} 
    923923 
     
    929929  int all = SW_ISSET(sw, SWITCH_ALL); 
    930930  if (SW_ISSET(sw, SWITCH_BRIEF)) 
    931     do_examine(player, arg_left, 1, all); 
     931    do_examine(player, arg_left, EXAM_BRIEF, all); 
    932932  else if (SW_ISSET(sw, SWITCH_DEBUG)) 
    933933    do_debug_examine(player, arg_left); 
    934934  else if (SW_ISSET(sw, SWITCH_MORTAL)) 
    935     do_examine(player, arg_left, 2, all); 
    936   else 
    937     do_examine(player, arg_left, 0, all); 
     935    do_examine(player, arg_left, EXAM_MORTAL, all); 
     936  else 
     937    do_examine(player, arg_left, EXAM_NORMAL, all); 
    938938} 
    939939 
  • 1.7.7/src/cque.c

    r459 r465  
    894894 */ 
    895895void 
    896 do_queue(dbref player, const char *what, int flag) 
     896do_queue(dbref player, const char *what, enum queue_type flag) 
    897897{ 
    898898  dbref victim = NOTHING; 
     
    902902  int pq = 0, oq = 0, wq = 0, sq = 0; 
    903903  int tpq = 0, toq = 0, twq = 0, tsq = 0; 
    904   if (flag == 2 || flag == 3
     904  if (flag == QUEUE_SUMMARY || flag == QUEUE_QUICK
    905905    quick = 1; 
    906   if (flag == 1 || flag == 2) { 
     906  if (flag == QUEUE_ALL || flag == QUEUE_SUMMARY) { 
    907907    all = 1; 
    908908    victim = player; 
     
    928928 
    929929    if (!quick) { 
    930       if (all == 1
     930      if (all == QUEUE_ALL
    931931    notify(player, T("Queue for : all")); 
    932932      else 
  • 1.7.7/src/extchat.c

    r463 r465  
    6565static int yesno(const char *str); 
    6666static int canstilladd(dbref player); 
    67 static int find_channel_partial_on(const char *name, CHAN **chan, dbref player); 
    68 static int find_channel_partial_off 
    69   (const char *name, CHAN **chan, dbref player); 
     67static enum cmatch_type find_channel_partial_on(const char *name, CHAN **chan, 
     68                        dbref player); 
     69static enum cmatch_type find_channel_partial_off(const char *name, CHAN **chan, 
     70                         dbref player); 
    7071static char *list_cflags(CHAN *c); 
    7172static char *list_cuflags(CHANUSER *u); 
     
    150151      list_partial_matches(player, name, PMATCH_ALL); \ 
    151152      return; \ 
     153    default: \ 
     154      break; \ 
    152155     } \ 
    153156    } while (0) 
     
    688691 * \retval CMATCH_NONE no match for channel name. 
    689692 */ 
    690 int 
     693enum cmatch_type 
    691694find_channel(const char *name, CHAN **chan, dbref player) 
    692695{ 
     
    743746 * \retval CMATCH_NONE no match for channel name. 
    744747 */ 
    745 int 
     748enum cmatch_type 
    746749find_channel_partial(const char *name, CHAN **chan, dbref player) 
    747750{ 
     
    830833 * \retval CMATCH_NONE no match for channel name. 
    831834 */ 
    832 static int 
     835static enum cmatch_type 
    833836find_channel_partial_on(const char *name, CHAN **chan, dbref player) 
    834837{ 
     
    879882 * \retval CMATCH_NONE no match for channel name. 
    880883 */ 
    881 static int 
     884static enum cmatch_type 
    882885find_channel_partial_off(const char *name, CHAN **chan, dbref player) 
    883886{ 
     
    11101113    list_partial_matches(player, name, PMATCH_OFF); 
    11111114    return; 
     1115  default: 
     1116    break; 
    11121117  } 
    11131118  if (!Chan_Can_See(chan, player)) { 
     
    11721177    list_partial_matches(player, name, PMATCH_ON); 
    11731178    return; 
     1179  default: 
     1180    break; 
    11741181  } 
    11751182  u = onchannel(player, chan); 
     
    13971404    list_partial_matches(player, name, PMATCH_ALL); 
    13981405    return; 
     1406  default: 
     1407    break; 
    13991408  } 
    14001409  if (!Chan_Can_See(chan, player)) { 
     
    24272436  CHAN *chan = NULL; 
    24282437  CHANUSER *u; 
    2429   int i; 
    24302438  dbref who; 
    2431   i = find_channel(args[0], &chan, executor); 
    2432   switch (i) { 
     2439 
     2440  switch (find_channel(args[0], &chan, executor)) { 
    24332441  case CMATCH_NONE: 
    24342442    notify(executor, T("No such channel.")); 
     
    24372445    notify(executor, T("I can't tell which channel you mean.")); 
    24382446    return; 
     2447  default: 
     2448    break; 
    24392449  } 
    24402450 
     
    26862696    safe_str("#-2 AMBIGUOUS CHANNEL MATCH", buff, bp); 
    26872697    return; 
     2698  default: 
     2699    break; 
    26882700  } 
    26892701 
  • 1.7.7/src/extmail.c

    r463 r465  
    12221222 * \param player the enactor. 
    12231223 * \param name name of player whose mail stats are to be checked (NULL for all) 
    1224  * \param full level of verbosity: 0 = just count messages, 1 = break down by 
    1225  * read/unread, 2 = include space usage. 
     1224 * \param full level of verbosity: MSTATS_COUNT = just count messages, 
     1225 * MSTATS_READ = break down by read/unread, MSTATS_SIZE = include 
     1226 * space usage. 
    12261227 */ 
    12271228void 
    1228 do_mail_stats(dbref player, char *name, int full) 
     1229do_mail_stats(dbref player, char *name, enum mail_stats_type full) 
    12291230{ 
    12301231  dbref target; 
     
    12721273  } 
    12731274  if (target == AMBIGUOUS) {    /* stats for all */ 
    1274     if (full == 0) { 
     1275    if (full == MSTATS_COUNT) { 
    12751276      notify_format(player, 
    12761277            T("There are %d messages in the mail spool."), mdb_top); 
    12771278      return; 
    1278     } else if (full == 1) { 
     1279    } else if (full == MSTATS_READ) { 
    12791280      for (mp = HEAD; mp != NULL; mp = mp->next) { 
    12801281    if (Cleared(mp)) 
     
    13191320  /* individual stats */ 
    13201321 
    1321   if (full == 0) { 
     1322  if (full == MSTATS_COUNT) { 
    13221323    /* just count number of messages */ 
    13231324    for (mp = HEAD; mp != NULL; mp = mp->next) { 
     
    13401341      else 
    13411342    fu++; 
    1342       if (full == 2
     1343      if (full == MSTATS_SIZE
    13431344    fchars += strlen(get_message(mp)); 
    13441345    } 
     
    13521353      else 
    13531354    tu++; 
    1354       if (full == 2
     1355      if (full == MSTATS_SIZE
    13551356    tchars += strlen(get_message(mp)); 
    13561357    } 
     
    13591360  notify_format(player, T("Mail statistics for %s:"), Name(target)); 
    13601361 
    1361   if (full == 1) { 
     1362  if (full == MSTATS_READ) { 
    13621363    notify_format(player, T("%d messages sent, %d unread, %d cleared."), 
    13631364          fc + fr + fu, fu, fc); 
  • 1.7.7/src/flags.c

    r463 r465  
    17661766  Flagspace_Lookup(n, ns); 
    17671767  /* Don't double-add */ 
    1768   if ((f = match_flag_ns(n, name))) 
     1768  if ((f = match_flag_ns(n, strupper(name)))) 
    17691769    return f; 
    17701770  f = new_flag(); 
  • 1.7.7/src/funstr.c

    r463 r465  
    661661  char rawstr[BUFFER_LEN]; 
    662662  char *ip, *op; 
    663   int i, len; 
     663  size_t i, len; 
    664664  char *c; 
    665665  ansi_string *as; 
  • 1.7.7/src/game.c

    r463 r465  
    3535#endif 
    3636#include <stdlib.h> 
     37#include <stdarg.h> 
    3738#ifdef I_UNISTD 
    3839#include <unistd.h> 
     
    529530 
    530531  mush_panic(c); 
     532  _exit(136);           /* Not reached but kills warnings */ 
    531533} 
    532534 
  • 1.7.7/src/log.c

    r463 r465  
    1616#include <string.h> 
    1717#include <stdarg.h> 
     18#include <stdlib.h> 
    1819#ifdef I_SYS_TIME 
    1920#include <sys/time.h> 
  • 1.7.7/src/look.c

    r463 r465  
    673673 */ 
    674674void 
    675 do_examine(dbref player, const char *name, int brief, int all) 
     675do_examine(dbref player, const char *name, enum exam_type flag, int all) 
    676676{ 
    677677  dbref thing; 
     
    715715    return; 
    716716  } 
    717   if (brief == 2) { 
     717  if (flag == EXAM_MORTAL) { 
    718718    ok = 0; 
    719719  } else { 
     
    743743      notify(player, flag_description(player, thing)); 
    744744  } 
    745   if (EX_PUBLIC_ATTRIBS && (brief != 1)) { 
     745  if (EX_PUBLIC_ATTRIBS && (flag != EXAM_BRIEF)) { 
    746746    a = atr_get_noparent(thing, "DESCRIBE"); 
    747747    if (a) { 
     
    781781 
    782782  /* show attributes */ 
    783   switch (brief) { 
    784   case 0:         /* Standard */ 
     783  switch (flag) { 
     784  case EXAM_NORMAL:       /* Standard */ 
    785785    if (EX_PUBLIC_ATTRIBS || ok) 
    786786      look_atrs(player, thing, NULL, all); 
    787787    break; 
    788   case 1:         /* Brief */ 
    789     break; 
    790   case 2:         /* Mortal */ 
     788  case EXAM_BRIEF:        /* Brief */ 
     789    break; 
     790  case EXAM_MORTAL:       /* Mortal */ 
    791791    if (EX_PUBLIC_ATTRIBS) 
    792792      mortal_look_atrs(player, thing, NULL, all); 
  • 1.7.7/src/move.c

    r463 r465  
    515515  long match_flags = 
    516516    MAT_NEIGHBOR | MAT_ABSOLUTE | MAT_CHECK_KEYS | MAT_NEAR | MAT_ENGLISH; 
    517   char *myenv[10]; 
    518   int i; 
     517 
    519518  if (!IsRoom(loc) && !EnterOk(loc) && !controls(player, loc)) { 
    520519    notify(player, T("Permission denied.")); 
     
    568567    did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", 
    569568           NOTHING); 
    570     myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); 
    571     sprintf(myenv[0], "#%d", thing); 
    572     for (i = 1; i < 10; i++) 
    573       myenv[i] = NULL; 
    574     real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
    575             "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); 
    576     mush_free(myenv[0], "dbref"); 
     569    did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
     570            "ARECEIVE", NOTHING, thing, NOTHING, NA_INTER_HEAR); 
    577571      } else 
    578572    fail_lock(player, thing, Basic_Lock, 
     
    615609      did_it(player, thing, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, 
    616610         "ASUCCESS", NOTHING); 
    617       myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); 
    618       sprintf(myenv[0], "#%d", thing); 
    619       for (i = 1; i < 10; i++) 
    620         myenv[i] = NULL; 
    621       real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
    622               "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); 
    623       mush_free(myenv[0], "dbref"); 
     611      did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
     612              "ARECEIVE", NOTHING, thing, NOTHING, NA_INTER_HEAR); 
    624613    } else 
    625614      fail_lock(player, thing, Basic_Lock, T("You can't pick that up."), 
     
    775764    /* Now do the work, if we should. That includes triggering messages */ 
    776765    if (empty_ok) { 
    777       int i; 
    778766      char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN], *tp; 
    779       char *myenv[10]; 
     767 
    780768      count++; 
    781769      /* Get messages */ 
     
    794782    did_it(player, item, "SUCCESS", tbuf1, "OSUCCESS", tbuf2, "ASUCCESS", 
    795783           NOTHING); 
    796     myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); 
    797     sprintf(myenv[0], "#%d", item); 
    798     for (i = 1; i < 10; i++) 
    799       myenv[i] = NULL; 
    800     real_did_it(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
    801             "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); 
    802     mush_free(myenv[0], "dbref"); 
     784    did_it_with(player, player, "RECEIVE", NULL, "ORECEIVE", NULL, 
     785            "ARECEIVE", NOTHING, item, NOTHING, NA_INTER_HEAR); 
    803786      } 
    804787      /* Drop messages */ 
  • 1.7.7/src/mysocket.c

    r463 r465  
    994994 
    995995  if (hintsp == NULL) { 
    996     bzero(&hints, sizeof(hints)); 
     996    memset(&hints, 0, sizeof(hints)); 
    997997    hints.ai_family = AF_UNSPEC; 
    998998  } else 
  • 1.7.7/src/predicat.c

    r463 r465  
    152152{ 
    153153  /* Bunch o' nulls */ 
    154   static char *myenv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 
     154  static char *myenv[10] = { NULL }; 
    155155  return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, 
    156156             NA_INTER_HEAR); 
     157} 
     158 
     159/** A wrapper for real_did_it that can set %0 and %1 to dbrefs. 
     160 * \param player the enactor. 
     161 * \param thing object being triggered. 
     162 * \param what message attribute for enactor. 
     163 * \param def default message to enactor. 
     164 * \param owhat message attribute for others. 
     165 * \param odef default message to others. 
     166 * \param awhat action attribute to trigger. 
     167 * \param loc location in which action is taking place. 
     168 * \param env0 dbref to pass as %0, or NOTHING. 
     169 * \param env1 dbref to pass as %1, or NOTHING. 
     170 * \param flags interaction flags to pass to real_did_it. 
     171 * \retval 0 no attributes were present, only defaults were used if given. 
     172 * \retval 1 some attributes were evaluated and used. 
     173 */ 
     174int 
     175did_it_with(dbref player, dbref thing, const char *what, const char *def, 
     176        const char *owhat, const char *odef, const char *awhat, 
     177        dbref loc, dbref env0, dbref env1, int flags) 
     178{ 
     179  char *myenv[10] = { NULL }; 
     180  char e0[SBUF_LEN], e1[SBUF_LEN], *ep; 
     181 
     182  if (env0 != NOTHING) { 
     183    ep = e0; 
     184    safe_dbref(env0, e0, &ep); 
     185    *ep = '\0'; 
     186    myenv[0] = e0; 
     187  } 
     188 
     189  if (env1 != NOTHING) { 
     190    ep = e1; 
     191    safe_dbref(env1, e1, &ep); 
     192    *ep = '\0'; 
     193    myenv[1] = e1; 
     194  } 
     195 
     196  return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, 
     197             flags); 
    157198} 
    158199 
     
    177218{ 
    178219  /* Bunch o' nulls */ 
    179   static char *myenv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 
     220  static char *myenv[10] = { NULL }; 
    180221  return real_did_it(player, thing, what, def, owhat, odef, awhat, loc, myenv, 
    181222             flags); 
  • 1.7.7/src/rob.c

    r463 r465  
    146146  char tbuf1[BUFFER_LEN]; 
    147147  char *bp; 
    148   char *myenv[10]; 
    149   int i; 
    150148 
    151149  /* If we have a recipient, but no amnt, try parsing for 
     
    211209 
    212210    /* Notify the giver with their GIVE message */ 
    213     myenv[0] = (char *) mush_malloc(BUFFER_LEN, "dbref"); 
    214     myenv[1] = (char *) mush_malloc(BUFFER_LEN, "dbref"); 
    215     sprintf(myenv[0], "#%d", thing); 
    216     sprintf(myenv[1], "#%d", who); 
    217     for (i = 2; i < 10; i++) 
    218       myenv[i] = NULL; 
    219211    bp = tbuf1; 
    220212    safe_format(tbuf1, &bp, T("You gave %s to %s."), Name(thing), 
    221213            Name(who)); 
    222214    *bp = '\0'; 
    223     real_did_it(player, player, "GIVE", tbuf1, "OGIVE", NULL, 
    224             "AGIVE", NOTHING, myenv, NA_INTER_SEE); 
     215    did_it_with(player, player, "GIVE", tbuf1, "OGIVE", NULL, 
     216            "AGIVE", NOTHING, thing, who, NA_INTER_SEE); 
    225217 
    226218    /* Notify the object that it's been given */ 
     
    234226            Name(thing)); 
    235227    *bp = '\0'; 
    236     sprintf(myenv[1], "#%d", player); 
    237     real_did_it(who, who, "RECEIVE", tbuf1, "ORECEIVE", NULL, 
    238             "ARECEIVE", NOTHING, myenv, NA_INTER_SEE); 
    239  
    240     mush_free(myenv[0], "dbref"); 
    241     mush_free(myenv[1], "dbref"); 
     228    did_it_with(who, who, "RECEIVE", tbuf1, "ORECEIVE", NULL, 
     229            "ARECEIVE", NOTHING, thing, player, NA_INTER_SEE); 
    242230      } else 
    243231    notify(player, T("Permission denied.")); 
     
    268256    notify_format(player, T("You don't have that many %s to give!"), MONIES); 
    269257  } else { 
    270     char *pay_env[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 
     258    char *pay_env[10] = { NULL }; 
    271259    char paid[SBUF_LEN], *pb; 
    272260 
  • 1.7.7/src/version.c

    r425 r465  
    4242  notify_format(player, T("Last restarted: %s"), buff); 
    4343 
    44   notify_format(player, "%s", VERSION); 
     44  notify_format(player, "PennMUSH version %s patchlevel %s %s", VERSION, 
     45        PATCHLEVEL, PATCHDATE); 
    4546#ifdef PATCHES 
    4647  notify_format(player, "Patches: %s", PATCHES); 
  • 1.7.7/src/wiz.c

    r463 r465  
    741741 * \param player the enactor. 
    742742 * \param name name of the player or descriptor to boot. 
    743  * \param flag 0=normal, 1=boot by descriptor, 2=self-boot 
     743 * \param flag the type of booting to do. 
    744744 */ 
    745745void 
    746 do_boot(dbref player, const char *name, int flag) 
     746do_boot(dbref player, const char *name, enum boot_type flag) 
    747747{ 
    748748  dbref victim; 
     
    751751  victim = NOTHING; 
    752752  switch (flag) { 
    753   case 2
     753  case BOOT_SELF
    754754    /* self boot */ 
    755755    victim = player; 
    756756    break; 
    757   case 1
     757  case BOOT_DESC
    758758    /* boot by descriptor */ 
    759759    victim = find_player_by_desc(atoi(name)); 
    760760    if (victim == player) 
    761       flag = 2
     761      flag = BOOT_SELF
    762762    else if (victim == NOTHING) { 
    763763      d = port_desc(atoi(name)); 
     
    769769    } 
    770770    break; 
    771   case 0
     771  case BOOT_NAME
    772772    /* boot by name */ 
    773773    if ((victim = 
     
    778778    } 
    779779    if (victim == player) 
    780       flag = 2
     780      flag = BOOT_SELF
    781781    break; 
    782782  } 
     
    792792  /* look up descriptor */ 
    793793  switch (flag) {