Changeset 816
- Timestamp:
- 05/05/07 23:43:39 (2 years ago)
- Files:
-
- 1.8.2/branches/devel/CHANGES.182 (modified) (1 diff)
- 1.8.2/branches/devel/Patchlevel (modified) (1 diff)
- 1.8.2/branches/devel/game/txt/hlp/pennv181.hlp (modified) (4 diffs)
- 1.8.2/branches/devel/game/txt/hlp/pennv182.hlp (modified) (3 diffs)
- 1.8.2/branches/devel/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.2/branches/devel/hdrs/attrib.h (modified) (6 diffs)
- 1.8.2/branches/devel/src/Makefile.SH (modified) (1 diff)
- 1.8.2/branches/devel/src/attrib.c (modified) (14 diffs)
- 1.8.2/branches/devel/src/bsd.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/conf.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/cque.c (modified) (4 diffs)
- 1.8.2/branches/devel/src/funlist.c (modified) (1 diff)
- 1.8.2/branches/devel/src/funstr.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/game.c (modified) (5 diffs)
- 1.8.2/branches/devel/src/move.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/parse.c (modified) (1 diff)
- 1.8.2/branches/devel/src/portmsg.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/rob.c (modified) (3 diffs)
- 1.8.2/branches/devel/src/set.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/wiz.c (modified) (5 diffs)
- 1.8.2/branches/devel/utils/mkvershlp.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.2/branches/devel/CHANGES.182
r814 r816 15 15 ========================================================================== 16 16 17 Version 1.8.2 patchlevel 4 ???, 200717 Version 1.8.2 patchlevel 4 May ??, 2007 18 18 19 19 Minor changes: 1.8.2/branches/devel/Patchlevel
r715 r816 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.2p 32 This is PennMUSH 1.8.2p4 1.8.2/branches/devel/game/txt/hlp/pennv181.hlp
r543 r816 1 1 & 1.8.1p10 2 2 Version 1.8.1 patchlevel 10 September 13, 2006 3 4 3 Fixes: 5 4 * Cleaned up some compiler warnings. [SW] … … 11 10 * Trying to ignore signals could crash on Win32. Reported by Intrevis. 12 11 * Fixed parse errors in non-C99 compilers. Reported by Intrevis. 13 * Help fixes by Talvo, Sketch .12 * Help fixes by Talvo, Sketch 14 13 * Fixes for 64-bit platforms [SW] 15 14 * @dump/paranoid produced corrupt databases. … … 29 28 * The above is used in db.c, function.c and plyrlist.c [SW] 30 29 * @config compile reports if MySQL support is present. (This does not 31 mean the game is configured to use it.) 30 mean the game is configured to use it.) [SW] 32 31 * restart copies log files from the last time the mush was running to 33 32 game/save/ instead of deleting them. [SW] … … 172 171 * NT_TCP code has been removed from the server. It was deemed 173 172 less useful than keeping the networking code unitary and 174 <the ability to @shutdown/reboot. Patch by Nathan Baum.173 the ability to @shutdown/reboot. Patch by Nathan Baum. 175 174 Flags: 176 175 * New LOUD flag (admin-settable) causes an object to bypass 1.8.2/branches/devel/game/txt/hlp/pennv182.hlp
r715 r816 1 & 1.8.2p 31 & 1.8.2p4 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.2 patchlevel 4 May ??, 2007 15 16 Minor changes: 17 * speak() uses accented names. Sketch. 18 * config() no longer lists options that can't be set 19 with @config/set. Suggested by Trispis. [SW] 20 * 'page foo\=bar' pages the last person you paged. Fix by Nathan 21 Baum. 22 * Receipt of a SIGUSR1 (Causing a shutdown/reboot) is explictly 23 logged. Suggested by Interloper. [SW] 24 * @wipe reports the number of attributes deleted. [183] 25 26 Fixes: 27 * You can no longer save objects slated to be destroyed 28 by using @set foo=!GOING (The help file for GOING now tells 29 the truth) Reported by Cooee. [SW] 30 * Useless variable in real_unparse() removed. Reported by 31 Taladan. [SW] 32 * 'make portmsg' works, and portmsg.c rewritten to current 33 Penn standards. [SW] 34 * case() would replace #$ in the default argument, contrary 35 to the help file. Reported by Talvo. [SW] 36 * Memory leak in grep(). [SW] 37 * Quotes can be around the player name on the login screen 38 always, instead of just when player_name_spaces was 39 on. Suggested by Dan Widdis. [SW] 40 * '{think foo} bar' exhibited odd behavior. [GM] 41 * 'make test' wouldn't work right unless '.' was in you path. 42 Fix by Nathan Baum. 43 * stdin and stdout weren't getting closed, potentially causing 44 problems when trying to log out of a shell after starting 45 a mush. Reported by K Moon. [SW] 46 * NetBSD compile and general warning fixes. [SW] 47 * Favor difftime(3) over subtraction of time_t variables. [SW] 48 * Clarification of attribute trees in HELP @WIPE. Suggested by 49 Talvo. 50 * Loading a db with empty attributes used as the roots of 51 attribute trees didn't work if empty_attrs is set to no. 52 Reported by Kevin. [SW] 53 * Bugs in wiping attribute trees with attributes the wiper 54 doesn't have permission to delete fixed. [SW] 55 56 & 1.8.2p3 14 57 Version 1.8.2 patchlevel 3 March 11, 2007 15 58 … … 54 97 of the name for @ahear/@aahear/@amhear. [SW] 55 98 * Fixed the distribution of random numbers with a huge range. Reported 56 by Luke. 99 by Luke. 57 100 58 101 & 1.8.2p1 1.8.2/branches/devel/game/txt/hlp/pennvOLD.hlp
r581 r816 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.2: 0, 1 4420 1.8.2: 0, 1, 2, 3, 4 4421 4421 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4422 4422 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.8.2/branches/devel/hdrs/attrib.h
r814 r816 42 42 AE_OKAY = 0, /**< Success */ 43 43 AE_ERROR = -1, /**< general failure */ 44 AE_SAFE = -2, /**< attempt to overwrite a safe attribute */44 AE_SAFE = -2, /**< attempt to overwrite a safe attribute */ 45 45 AE_BADNAME = -3, /**< invalid name */ 46 46 AE_TOOMANY = -4, /**< too many attribs */ 47 AE_TREE = -5, /**< unable to delete/create entire tree */47 AE_TREE = -5, /**< unable to delete/create entire tree */ 48 48 AE_NOTFOUND = -6 /** No such attribute */ 49 49 } atr_err; … … 57 57 unsigned int flags, unsigned char derefs); 58 58 extern atr_err atr_add(dbref thing, char const *RESTRICT atr, 59 char const *RESTRICT s, dbref player, unsigned int flags); 59 char const *RESTRICT s, dbref player, 60 unsigned int flags); 60 61 extern atr_err atr_clr(dbref thing, char const *atr, dbref player); 61 62 extern atr_err wipe_atr(dbref thing, char const *atr, dbref player); … … 79 80 const char *str); 80 81 extern int do_set_atr(dbref thing, char const *RESTRICT atr, 81 char const *RESTRICT s, dbref player, int flags);82 char const *RESTRICT s, dbref player, unsigned int flags); 82 83 extern void do_atrlock(dbref player, char const *arg1, char const *arg2); 83 84 extern void do_atrchown(dbref player, char const *arg1, char const *arg2); … … 98 99 99 100 /* possible attribute flags */ 100 #define AF_EMPTY_FLAGS 0x0 /**< No flag at all */101 #define AF_EMPTY_FLAGS 0x0 /**< No flag at all */ 101 102 #define AF_ODARK 0x1 /**< OBSOLETE! Leave here but don't use */ 102 103 #define AF_INTERNAL 0x2 /**< no one can see it or set it */ … … 112 113 #define AF_CASE 0x800 /**< Match $/^ patterns case-sensitive */ 113 114 #define AF_SAFE 0x1000 /**< This attribute may not be modified */ 114 #define AF_ROOT 0x2000 /**< Root of an attribute tree */115 #define AF_UNDEF1 0x4000 /**< Undefined; reserved for a future flag */116 #define AF_UNDEF2 0x8000 /**< Undefined; reserved for a future flag */115 #define AF_ROOT 0x2000 /**< Root of an attribute tree */ 116 #define AF_UNDEF1 0x4000 /**< Undefined; reserved for a future flag */ 117 #define AF_UNDEF2 0x8000 /**< Undefined; reserved for a future flag */ 117 118 #define AF_STATIC 0x10000 /**< OBSOLETE! Leave here but don't use */ 118 119 #define AF_COMMAND 0x20000 /**< INTERNAL: value starts with $ */ … … 131 132 #define AF_MHEAR 0x20000000 /**< ^-listens can be triggered by %! */ 132 133 #define AF_AHEAR 0x40000000 /**< ^-listens can be triggered by anyone */ 133 #define AF_UNDEF3 0x80000000 /**< Undefined; reserved for a future flag */134 #define AF_UNDEF3 0x80000000 /**< Undefined; reserved for a future flag */ 134 135 135 #define AF_MAXVAL 0x100000000 /**< Largest attribute flag value. */136 #define AF_MAXVAL 0x100000000 /**< Largest attribute flag value. */ 136 137 137 138 /*** external predefined attributes. */ 1.8.2/branches/devel/src/Makefile.SH
r736 r816 212 212 /usr/bin/expand $$file > tmpfile; mv -f tmpfile $$file; \ 213 213 /usr/bin/indent -npro -kr -ci2 -ss -psl -ip4 -i2 -cs -l80 -lc75 \ 214 -T ATRALIAS -T DESC -T CNode -T CONF -T BQUE -T FUN \214 -T atr_err -T ATRALIAS -T DESC -T CNode -T CONF -T BQUE -T FUN \ 215 215 -T NVAL -T i_rec -T f_rec -T USERFN_ENTRY -T PRIV -T FLAG \ 216 216 -T FLAGENT -T FLAG_ALIAS -T tlist -T u -T stat -T tcheck -T ATTR \ 1.8.2/branches/devel/src/attrib.c
r814 r816 70 70 static ATTR *find_atr_pos_in_list(ATTR ***pos, char const *name); 71 71 static atr_err can_create_attr(dbref player, dbref obj, char const *atr_name, 72 unsigned int flags);72 unsigned int flags); 73 73 static ATTR *find_atr_in_list(ATTR *atr, char const *name); 74 74 static ATTR *atr_get_with_parent(dbref obj, char const *atrname, dbref *parent); … … 566 566 root->data = chunk_create(t, u_strlen(t), 0); 567 567 free(t); 568 } 569 } 570 } 571 568 } 569 } 570 } 571 572 572 AL_FLAGS(ptr) = flags; 573 573 AL_FLAGS(ptr) &= ~AF_COMMAND & ~AF_LISTEN; … … 664 664 free(t); 665 665 } 666 } else 666 } else 667 667 AL_FLAGS(root) |= AF_ROOT; 668 668 … … 725 725 726 726 for (sub = atr_sub_branch(root); 727 sub && string_prefix(AL_NAME(sub), AL_NAME(root)); 728 sub = next) { 727 sub && string_prefix(AL_NAME(sub), AL_NAME(root)); sub = next) { 729 728 if (AL_FLAGS(sub) & AF_ROOT) { 730 729 if (!atr_clear_children(player, thing, sub)) { … … 748 747 atr_free_one(sub); 749 748 AttrCount(thing)--; 750 749 751 750 } 752 751 … … 782 781 783 782 if ((AL_FLAGS(ptr) & AF_ROOT) && !we_are_wiping) 784 return AE_TREE;783 return AE_TREE; 785 784 786 785 /* We only hit this if wiping. */ 787 786 if (AL_FLAGS(ptr) & AF_ROOT) 788 787 can_clear = atr_clear_children(player, thing, ptr); 789 788 790 789 if (can_clear) { 791 790 char *p; … … 799 798 atr_free_one(ptr); 800 799 AttrCount(thing)--; 801 800 802 801 /* If this was the only leaf of a tree, clear the AF_ROOT flag from 803 802 * the parent. */ … … 815 814 if (!atr_sub_branch(root)) 816 815 AL_FLAGS(root) &= ~AF_ROOT; 817 } 816 } 818 817 } 819 818 … … 838 837 839 838 840 /** \@wipe an attribute (And any lea fs) from an object.839 /** \@wipe an attribute (And any leaves) from an object. 841 840 * This function clears an attribute from an object. 842 * Permission is denied if the attribute is a branch, not a leaf.843 841 * \param thing object to clear attribute from. 844 842 * \param atr name of attribute to remove. … … 1623 1621 int 1624 1622 do_set_atr(dbref thing, const char *RESTRICT atr, const char *RESTRICT s, 1625 dbref player, int flags)1623 dbref player, unsigned int flags) 1626 1624 { 1627 1625 ATTR *old; 1628 1626 char name[BUFFER_LEN]; 1629 1627 char tbuf1[BUFFER_LEN]; 1630 intres;1628 atr_err res; 1631 1629 int was_hearer; 1632 1630 int was_listener; … … 1725 1723 was_listener = Listener(thing); 1726 1724 res = 1727 s ? atr_add(thing, name, s, player, (flags & 0x02) ? AF_NOPROG : AF_EMPTY_FLAGS) 1725 s ? atr_add(thing, name, s, player, 1726 (flags & 0x02) ? AF_NOPROG : AF_EMPTY_FLAGS) 1728 1727 : atr_clr(thing, name, player); 1729 1728 switch (res) { … … 1735 1734 if (!s) { 1736 1735 notify_format(player, 1737 T("Unable to remove '%s' because of a protected tree attribute."), 1736 T 1737 ("Unable to remove '%s' because of a protected tree attribute."), 1738 1738 name); 1739 1739 return 0; 1740 1740 } else { 1741 1741 notify_format(player, 1742 T("Unable to set '%s' because of a failure to create a needed parent attribute."), 1743 name); 1742 T 1743 ("Unable to set '%s' because of a failure to create a needed parent attribute."), 1744 name); 1744 1745 return 0; 1745 1746 } … … 1959 1960 * \return the pointer to an attribute, or NULL on error. 1960 1961 */ 1961 static ATTR *1962 static ATTR * 1962 1963 pop_free_list(void) 1963 1964 { … … 1976 1977 */ 1977 1978 static void 1978 push_free_list(ATTR *a) 1979 push_free_list(ATTR *a) 1979 1980 { 1980 1981 memset(a, 0, sizeof(*a)); 1.8.2/branches/devel/src/bsd.c
r814 r816 2559 2559 if (ModTime(player)) 2560 2560 notify_format(player, T("%ld failed connections since last login."), 2561 (long) ModTime(player));2561 (long) ModTime(player)); 2562 2562 ModTime(player) = (time_t) 0; 2563 2563 announce_connect(player, isnew, num); /* broadcast connect message */ … … 3325 3325 dt = 0; 3326 3326 3327 delta = gmtime(& dt);3327 delta = gmtime(&dt); 3328 3328 if (delta->tm_yday > 0) { 3329 3329 sprintf(buf, "%dd", delta->tm_yday); 1.8.2/branches/devel/src/conf.c
r786 r816 1547 1547 for (cp = conftable; cp->name; cp++) { 1548 1548 if (cp->group) { 1549 if (first)1550 first = 0;1551 else1552 safe_chr(' ', buff, bp);1553 safe_str(cp->name, buff, bp);1549 if (first) 1550 first = 0; 1551 else 1552 safe_chr(' ', buff, bp); 1553 safe_str(cp->name, buff, bp); 1554 1554 } 1555 1555 } … … 1557 1557 cp = (PENNCONF *) hash_nextentry(&local_options)) { 1558 1558 if (cp->group) { 1559 if (first)1560 first = 0;1561 else1562 safe_chr(' ', buff, bp);1563 safe_str(cp->name, buff, bp);1559 if (first) 1560 first = 0; 1561 else 1562 safe_chr(' ', buff, bp); 1563 safe_str(cp->name, buff, bp); 1564 1564 } 1565 1565 } 1.8.2/branches/devel/src/cque.c
r814 r816 614 614 item on it. Anything else is wasted time. */ 615 615 if (qwait) { 616 curr = (int) difftime(qwait->left, mudtime);616 curr = (int) difftime(qwait->left, mudtime); 617 617 if (curr <= 2) 618 618 return 1; … … 624 624 if (point->left == 0) /* no timeout */ 625 625 continue; 626 curr = (int) difftime(point->left,mudtime);626 curr = (int) difftime(point->left, mudtime); 627 627 if (curr <= 2) 628 628 return 1; … … 914 914 switch (q_type) { 915 915 case 1: /* wait queue */ 916 notify_format(player, "[%ld]%s: %s", (long)difftime(tmp->left, mudtime), 916 notify_format(player, "[%ld]%s: %s", 917 (long) difftime(tmp->left, mudtime), 917 918 unparse_object(player, tmp->player), tmp->comm); 918 919 break; … … 920 921 if (tmp->left != 0) { 921 922 notify_format(player, "[#%d/%s/%ld]%s: %s", tmp->sem, 922 tmp->semattr, (long) difftime(tmp->left, mudtime),923 tmp->semattr, (long) difftime(tmp->left, mudtime), 923 924 unparse_object(player, tmp->player), tmp->comm); 924 925 } else { 1.8.2/branches/devel/src/funlist.c
r703 r816 1239 1239 for (i = 0; i < nptrs; i++) { 1240 1240 /* Build our %0 args */ 1241 wenv[0] = (char *) ptrs[i];1241 wenv[0] = (char *) ptrs[i]; 1242 1242 call_ufun(&ufun, wenv, 2, result, executor, enactor, pe_info); 1243 1243 keys[i] = mush_strdup(result, "sortkey"); 1.8.2/branches/devel/src/funstr.c
r793 r816 2232 2232 if (say) 2233 2233 safe_format(buff, bp, "%s %s \"%s\"", accented_name(speaker), 2234 say_string, string);2234 say_string, string); 2235 2235 else 2236 2236 safe_str(string, buff, bp); … … 2249 2249 if (strlen(rbuff) > 0) { 2250 2250 safe_format(buff, bp, "%s %s %s", accented_name(speaker), 2251 say_string, rbuff);2251 say_string, rbuff); 2252 2252 return; 2253 2253 } else if (null == 1) { 1.8.2/branches/devel/src/game.c
r814 r816 2126 2126 T 2127 2127 ("Time until next database save: %ld minutes %ld seconds, at %s"), 2128 ((long) difftime(options.dump_counter, mudtime)) / 60,2129 ((long) difftime(options.dump_counter, mudtime)) % 60, tbuf1);2128 ((long) difftime(options.dump_counter, mudtime)) / 60, 2129 ((long) difftime(options.dump_counter, mudtime)) % 60, tbuf1); 2130 2130 2131 2131 when = localtime(&options.dbck_counter); … … 2134 2134 T 2135 2135 (" Time until next dbck check: %ld minutes %ld seconds, at %s."), 2136 ((long) difftime(options.dbck_counter, mudtime)) / 60,2137 ((long) difftime(options.dbck_counter, mudtime)) % 60, tbuf1);2136 ((long) difftime(options.dbck_counter, mudtime)) / 60, 2137 ((long) difftime(options.dbck_counter, mudtime)) % 60, tbuf1); 2138 2138 2139 2139 when = localtime(&options.purge_counter); … … 2142 2142 T 2143 2143 (" Time until next purge: %ld minutes %ld seconds, at %s."), 2144 ((long) difftime(options.purge_counter, mudtime)) / 60,2145 ((long) difftime(options.purge_counter, mudtime)) % 60, tbuf1);2144 ((long) difftime(options.purge_counter, mudtime)) / 60, 2145 ((long) difftime(options.purge_counter, mudtime)) % 60, tbuf1); 2146 2146 2147 2147 if (options.warn_interval) { … … 2151 2151 T 2152 2152 (" Time until next @warnings: %ld minutes %ld seconds, at %s."), 2153 ((long) difftime(options.warn_counter, mudtime)) / 60,2154 ((long) difftime(options.warn_counter, mudtime)) % 60, tbuf1);2153 ((long) difftime(options.warn_counter, mudtime)) / 60, 2154 ((long) difftime(options.warn_counter, mudtime)) % 60, tbuf1); 2155 2155 } 2156 2156 … … 2158 2158 T 2159 2159 ("PennMUSH Uptime: %ld days %ld hours %ld minutes %ld seconds"), 2160 ((long)difftime(mudtime, globals.first_start_time)) / 86400, 2161 ((long)difftime(mudtime, globals.first_start_time) % 86400) / 3600, 2162 (((long)difftime(mudtime, globals.first_start_time) % 86400) % 3600) / 60, 2163 (((long)difftime(mudtime, globals.first_start_time) % 86400) % 3600) % 60); 2160 ((long) difftime(mudtime, globals.first_start_time)) / 86400, 2161 ((long) difftime(mudtime, globals.first_start_time) % 86400) / 2162 3600, 2163 (((long) difftime(mudtime, globals.first_start_time) % 86400) % 2164 3600) / 60, 2165 (((long) difftime(mudtime, globals.first_start_time) % 86400) % 2166 3600) % 60); 2164 2167 2165 2168 /* Mortals, go no further! */ 1.8.2/branches/devel/src/move.c
r814 r816 1175 1175 strcpy(flwr, unparse_dbref(follower)); 1176 1176 strcpy(tbuf1, atr_value(a)); 1177 (void) atr_add(leader, "FOLLOWERS", 1178 remove_word(tbuf1, flwr, ' '), GOD, 0); 1177 (void) atr_add(leader, "FOLLOWERS", remove_word(tbuf1, flwr, ' '), GOD, 0); 1179 1178 } 1180 1179 … … 1192 1191 strcpy(ldr, unparse_dbref(leader)); 1193 1192 strcpy(tbuf1, atr_value(a)); 1194 (void) atr_add(follower, "FOLLOWING", 1195 remove_word(tbuf1, ldr, ' '), GOD, 0); 1193 (void) atr_add(follower, "FOLLOWING", remove_word(tbuf1, ldr, ' '), GOD, 0); 1196 1194 } 1197 1195 1.8.2/branches/devel/src/parse.c
r793 r816 812 812 goto exit_sequence; 813 813 (*str)++; 814 if (!isdigit((unsigned char) nextc)) {814 if (!isdigit((unsigned char) nextc)) { 815 815 safe_str(T(e_int), buff, bp); 816 816 break; 1.8.2/branches/devel/src/portmsg.c
r736 r816 97 97 const char *host_ip = SINGLE_IP_ADDR 98 98 #endif 99 100 static void wait_on_child(int sig); 101 static void lostconn(int sig) NORETURN; 102 103 enum { MAX_CONNECTIONS = 15 }; 104 int connections = 0; 105 99 static void wait_on_child(int sig); 106 100 static void 107 wait_on_child(int sig __attribute__ ((__unused__))) 101 lostconn(int sig) 102 NORETURN; 103 104 enum { MAX_CONNECTIONS = 15 }; 105 int connections = 0; 106 107 static void 108 wait_on_child(int sig __attribute__ ((__unused__))) 108 109 { 109 110 WAIT_TYPE status; 110 111 111 112 #ifdef HAS_WAITPID 112 while (waitpid(-1, &status, WNOHANG) > 0) 113 while (waitpid(-1, &status, WNOHANG) > 0) 113 114 connections--; 114 115 #else 115 while (wait3(&status, WNOHANG, NULL) > 0) 116 while (wait3(&status, WNOHANG, NULL) > 0) 116 117 connections--; 117 118 #endif … … 147 148 if (port == 0) { 148 149 fprintf(stderr, "error: bad port number [%s]\n", argv[2]); 149 return 1 ;150 return 1; 150 151 } 151 152 if ((msgfd = open(argv[1], O_RDONLY)) < 0) { 152 153 fprintf(stderr, "error: cannot open message file [%s]: %s\n", argv[1], 153 154 strerror(errno)); 154 return 1 ;155 return 1; 155 156 } 156 157 /* read the message */ … … 163 164 if (read(msgfd, msg, statBuf.st_size) != statBuf.st_size) { 164 165 fprintf(stderr, "error: cannot read message file [%s]\n", argv[1]); 165 return 1 ;166 return 1; 166 167 } 167 168 1.8.2/branches/devel/src/rob.c
r793 r816 227 227 if (!a) 228 228 continue; 229 strncpy(prices, atr_value(a),BUFFER_LEN);230 prices[BUFFER_LEN -1] = '\0';229 strncpy(prices, atr_value(a), BUFFER_LEN); 230 prices[BUFFER_LEN - 1] = '\0'; 231 231 upcasestr(prices); 232 232 count = list2arr(r, BUFFER_LEN / 2, prices, ' '); … … 549 549 return; 550 550 } 551 while ((s > arg) && isspace((unsigned char) *(s - 1))) {551 while ((s > arg) && isspace((unsigned char) *(s - 1))) { 552 552 s--; 553 553 } … … 559 559 s = (char *) string_match(s, "TO "); 560 560 s += 3; 561 while (*s && isspace((unsigned char) *s))561 while (*s && isspace((unsigned char) *s)) 562 562 s++; 563 563 if (!*s) { 1.8.2/branches/devel/src/set.c
r814 r816 1098 1098 case AE_TREE: 1099 1099 notify_format(player, 1100 T("Attribute %s cannot be wiped because a child attribute cannot be wiped."), 1100 T 1101 ("Attribute %s cannot be wiped because a child attribute cannot be wiped."), 1101 1102 AL_NAME(atr)); 1102 1103 /* Fall through */ … … 1140 1141 } 1141 1142 1142 switch ((wiped = 1143 atr_iter_get(player, thing, pattern, 0, wipe_helper, NULL))) { 1143 switch ((wiped = atr_iter_get(player, thing, pattern, 0, wipe_helper, NULL))) { 1144 1144 case 0: 1145 1145 notify(player, T("No attributes wiped.")); 1.8.2/branches/devel/src/wiz.c
r814 r816 201 201 limit = owned; 202 202 203 (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit - owned), GOD, 204 0); 203 (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit - owned), GOD, 0); 205 204 206 205 notify_format(player, T("Objects: %d Limit: %d"), owned, limit); … … 267 266 (void) atr_add(who, "RQUOTA", "0", GOD, 0); 268 267 else 269 (void) atr_add(who, "RQUOTA", tprintf("%d", limit - owned), GOD, 270 0); 268 (void) atr_add(who, "RQUOTA", tprintf("%d", limit - owned), GOD, 0); 271 269 } 272 270 } … … 1825 1823 /* A special old-timey kludge */ 1826 1824 if (class && !*class && restriction && *restriction) { 1827 if (isdigit((unsigned char)*restriction) || ((*restriction == '#') && *(restriction + 1) 1828 && isdigit((unsigned char)*(restriction + 1)))) { 1825 if (isdigit((unsigned char) *restriction) 1826 || ((*restriction == '#') && *(restriction + 1) 1827 && isdigit((unsigned char) *(restriction + 1)))) { 1829 1828 size_t offset = 0; 1830 1829 if (*restriction == '#') … … 1838 1837 if (!class || !*class || !restriction) 1839 1838 continue; 1840 if (isdigit((unsigned char)*class) || 1841 ((*class == '#') && *(class + 1) && isdigit((unsigned char)*(class + 1)))) { 1839 if (isdigit((unsigned char) *class) || 1840 ((*class == '#') && *(class + 1) 1841 && isdigit((unsigned char) *(class + 1)))) { 1842 1842 size_t offset = 0; 1843 1843 if (*class == '#') … … 1846 1846 if (!GoodObject(spec->low)) 1847 1847 spec->low = 0; 1848 if (isdigit((unsigned char)*restriction) || ((*restriction == '#') && *(restriction + 1) 1849 && isdigit((unsigned char)*(restriction + 1)))) { 1848 if (isdigit((unsigned char) *restriction) 1849 || ((*restriction == '#') && *(restriction + 1) 1850 && isdigit((unsigned char) *(restriction + 1)))) { 1850 1851 offset = 0; 1851 1852 if (*restriction == '#') 1.8.2/branches/devel/utils/mkvershlp.pl
r423 r816 1 #!/usr/ local/bin/perl1 #!/usr/bin/env perl 2 2 # 3 3 # Generate game/txt/hlp/ files from the CHANGES file(s).
