Changeset 429
- Timestamp:
- 08/12/06 18:08:34 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.176 (modified) (1 diff)
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/Makefile.SH (modified) (7 diffs)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/restart (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennflag.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennfunc.hlp (modified) (5 diffs)
- 1.7.7/game/txt/hlp/penntop.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennv176.hlp (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennv177.hlp (modified) (2 diffs)
- 1.7.7/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.7.7/game/txt/index-files.pl (modified) (1 diff)
- 1.7.7/hdrs/attrib.h (modified) (1 diff)
- 1.7.7/hdrs/switches.h (modified) (1 diff)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/src/attrib.c (modified) (7 diffs)
- 1.7.7/src/bsd.c (modified) (5 diffs)
- 1.7.7/src/chunk.c (modified) (11 diffs)
- 1.7.7/src/flags.c (modified) (7 diffs)
- 1.7.7/src/look.c (modified) (2 diffs)
- 1.7.7/src/mysocket.c (modified) (10 diffs)
- 1.7.7/src/set.c (modified) (2 diffs)
- 1.7.7/src/switchinc.c (modified) (2 diffs)
- 1.7.7/win32/funs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.176
r427 r429 13 13 14 14 ========================================================================== 15 16 Version 1.7.6 patchlevel 11 June 1, 2003 17 18 Minor changes: 19 * The restart script now insures that GAMEDIR is a real directory 20 and CONF_FILE exists therein before proceeding. Suggested by 21 Philip Mak. 22 * Attribute flag setting messages are more verbose. Suggested by 23 Mike Griffiths 24 * See_All players may use the ports() function. Suggested by 25 Mike Griffiths. 26 Fixes: 27 * Wizards can no longer @chzone God. Report by Kevin@M*U*S*H. 28 * Help fixes by Mike Griffiths. 15 29 16 30 Version 1.7.6 patchlevel 10 May 13, 2003 1.7.7/CHANGES.177
r427 r429 19 19 ========================================================================== 20 20 21 Version 1.7.7 patchlevel 15 June 1, 2003 22 23 Fixes: 24 * Problem with checking command flag masks when the number of 25 flags was an even multiple of 8. Reported by Nymeria and 26 Mordie@M*U*S*H. 27 * Tweak to improve efficiency of ancestor checking code and delint 28 warning reported by Cheetah@M*U*S*H. 29 * SESSION output no longer misaligned with 5-digit dbrefs. 30 Reported by Cheetah@M*U*S*H. [TAP]. 31 * Fixes from 1.7.6p11. 32 * game/txt/index-files.pl now uses locale information in the 33 environment to, e.g., correctly lowercase accented characters. 34 Report by Krad@M*U*S*H. 35 * Modified several Makefile.SH targets to prevent Javelin from 36 releasing patches that don't have the autogenerated files 37 up-to-date for Windows folks. 38 * Removed some dependence on typedefs that may or may not be in system 39 header files. [SW] 40 * Patch compiler warnings. [SW,EEH] 41 * Help fixes by Mike Griffiths and Oriens@Alexandria. 42 43 21 44 Version 1.7.7 patchlevel 14 May 22, 2003 22 45 1.7.7/Makefile.SH
r425 r429 57 57 GLOBAL_INSTALL=/usr/libexec/pennmush 58 58 59 all: config.h options.h hdrs/cmds.h hdrs/funs.h hdrs/switches.h src/switchinc.cgame/mush.cnf59 all: config.h options.h autogen game/mush.cnf 60 60 @echo "Making all in src." 61 61 (cd src; make all "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ … … 74 74 exit 1 75 75 76 autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h 77 76 78 hdrs/cmds.h: src/cmds.c src/command.c src/cque.c src/help.c src/set.c Patchlevel 77 79 (cd utils; sh mkcmds.sh commands) … … 80 82 (cd utils; sh mkcmds.sh switches) 81 83 82 #src/switchinc.c: hdrs/switches.h 83 #(cd utils; sh mkcmds.sh switches)84 src/switchinc.c: src/SWITCHES Patchlevel 85 (cd utils; sh mkcmds.sh switches) 84 86 85 87 hdrs/funs.h: src/fun*.c src/bsd.c src/conf.c src/extmail.c src/help.c src/wiz.c Patchlevel … … 121 123 122 124 versions: CHANGES* 123 - rm -rf CHANGES*~ CHANGES*bak124 utils/mkvershlp.pl game/txt/hlp CHANGES*125 -@rm -rf CHANGES*~ CHANGES*bak 126 @utils/mkvershlp.pl game/txt/hlp CHANGES* 125 127 126 128 safety: … … 135 137 # REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE! 136 138 indent: 137 (cd utils; sh mkcmds.sh) 138 (cd src; make indent) 139 @(cd src; make indent) 139 140 140 141 protoize: … … 201 202 game/txt/* game/txt/nws/* game/txt/evt/* game/txt/hlp/* ) 202 203 203 diffs: versions204 diffs: 204 205 @make indent > /dev/null 2>&1 205 @(cd utils; sh mkcmds.sh) > /dev/null 2>&1 206 @make versions > /dev/null 2>&1 207 @make touchswitches > /dev/null 2>&1 208 @make autogen > /dev/null 2>&1 206 209 @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:') 210 211 checkin: versions autogen 212 @prcs checkin 207 213 208 214 patch: versions … … 222 228 gzip /tmp/dist.tar 223 229 224 dist.tar: distclean versions 225 (cd utils; sh mkcmds.sh) 230 touchswitches: 231 @touch src/SWITCHES 232 233 dist.tar: indent distclean versions touchswitches autogen 226 234 makedist -c pennmush 227 235 tar -cvf /tmp/dist.tar pennmush 1.7.7/Patchlevel
r427 r429 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p1 42 This is PennMUSH 1.7.7p15 1.7.7/game/restart
r427 r429 9 9 # script lives in by hand. 10 10 GAMEDIR=`which $0 | sed 's/\/[^\/]*$//'` 11 cd $GAMEDIR12 echo Running from `pwd`13 14 11 15 12 # The config file … … 18 15 # The error log file 19 16 LOG=log/netmush.log 17 18 19 if [ ! -d $GAMEDIR ]; then 20 echo "GAMEDIR doesn't appear to be a directory. It's: $GAMEDIR" 21 exit 1 22 fi 23 24 cd $GAMEDIR 25 echo Running from `pwd` 26 27 if [ ! -f $CONF_FILE ]; then 28 echo "CONF_FILE doesn't exist. It's: $CONF_FILE" 29 exit 1 30 fi 20 31 21 32 # Internationalization stuff 1.7.7/game/txt/hlp/pennflag.hlp
r427 r429 532 532 type ancestor, and prevents attributes from being 533 533 retrieved from the ancestor. It has no effect on the object's 534 true @parents, only on theits use of the ancestor.534 true @parents, only on its use of the ancestor. 535 535 536 536 See also: @parent, ancestors 1.7.7/game/txt/hlp/pennfunc.hlp
r427 r429 1266 1266 @nameaccent, if any. 1267 1267 1268 Related functions: NAME(), ACCNAME(), INAME()1268 Related functions: NAME(), FULLNAME(), INAME() 1269 1269 & FRACTION() 1270 1270 fraction(<number>) … … 1347 1347 grep(<object>,<attrs>,<pattern>) 1348 1348 regrep(<object>,<attrs>,<regexp>) 1349 1350 This function returns a list of attributes on <object> containing 1349 grepi(<object>,<attrs>,<pattern>) 1350 regrepi(<object>,<attrs>,<regexp>) 1351 1352 These functions return a list of attributes on <object> containing 1351 1353 <pattern> (or matching <regexp>). <attrs> is a wildcard pattern for 1352 1354 attribute names to search; if you want to search all attributes, use "*". … … 1359 1361 <pattern> is NOT wildcard matched. 1360 1362 1361 These functions are case-sensitive. grepi()/regrepi() are case-insensitive. 1362 & GREPI() 1363 grepi(<object>,<attrs>,<pattern>) 1364 regrepi(<object>,<attrs>,<regexp>) 1365 1366 This function works exactly like grep or regrep, but is case-insensitive. 1367 See "help grep()" or "help regrep()" for details. 1363 grep()/regrep() are case-sensitive. grepi()/regrepi() are case-insensitive. 1368 1364 & GT() 1369 1365 gt(<num>,<num>) … … 2567 2563 2568 2564 This function returns the list of descriptors ("ports") that a player, 2569 specified by full player name, or by dbref, is connected to. Only Wizards 2570 and Royalty may use this function; if a user lacks the privileges, or the 2571 player is not connected, an empty list is returned. Otherwise, a list of 2572 ports is returned in order of most recent connection to least recent 2573 connection. 2565 specified by full player name, or by dbref, is connected to. Only players 2566 who are See_All or privileged may use this function; in other cases, 2567 an empty list is returned. Otherwise, a list of ports is returned in 2568 order of most recent connection to least recent connection. 2574 2569 & POS() 2575 2570 pos(<string1>,<string2>) … … 2649 2644 See also: edit(), regmatch() 2650 2645 & REGMATCH() 2646 & REGMATCHI() 2651 2647 (Help text from TinyMUSH 2.2.4, with permission) 2652 2648 regmatch(<string>,<regexp>[,<register list>]) 1.7.7/game/txt/hlp/penntop.hlp
r427 r429 903 903 executed, "me", for example, refers to the child, not the parent, 904 904 and the $-command's associated actions are performed by the child. 905 However, uselocks are checked on parents. Failing one stops looking906 for a matching command on that parent chain.907 905 908 906 (continued in help parents3) 1.7.7/game/txt/hlp/pennv176.hlp
r427 r429 1 & 1.7.6p11 2 Version 1.7.6 patchlevel 11 June 1, 2003 3 4 Minor changes: 5 * The restart script now insures that GAMEDIR is a real directory 6 and CONF_FILE exists therein before proceeding. Suggested by 7 Philip Mak. 8 * Attribute flag setting messages are more verbose. Suggested by 9 Mike Griffiths 10 * See_All players may use the ports() function. Suggested by 11 Mike Griffiths. 12 Fixes: 13 * Wizards can no longer @chzone God. Report by Kevin@M*U*S*H. 14 * Help fixes by Mike Griffiths. 15 1 16 & 1.7.6p10 2 17 Version 1.7.6 patchlevel 10 May 13, 2003 1.7.7/game/txt/hlp/pennv177.hlp
r427 r429 1 & 1.7.7p1 41 & 1.7.7p15 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.7.7 patchlevel 15 June 1, 2003 15 16 Fixes: 17 * Problem with checking command flag masks when the number of 18 flags was an even multiple of 8. Reported by Nymeria and 19 Mordie@M*U*S*H. 20 * Tweak to improve efficiency of ancestor checking code and delint 21 warning reported by Cheetah@M*U*S*H. 22 * SESSION output no longer misaligned with 5-digit dbrefs. 23 Reported by Cheetah@M*U*S*H. [TAP]. 24 * Fixes from 1.7.6p11. 25 * game/txt/index-files.pl now uses locale information in the 26 environment to, e.g., correctly lowercase accented characters. 27 Report by Krad@M*U*S*H. 28 * Modified several Makefile.SH targets to prevent Javelin from 29 releasing patches that don't have the autogenerated files 30 up-to-date for Windows folks. 31 * Removed some dependence on typedefs that may or may not be in system 32 header files. [SW] 33 * Patch compiler warnings. [SW,EEH] 34 * Help fixes by Mike Griffiths and Oriens@Alexandria. 35 36 37 & 1.7.7p14 14 38 Version 1.7.7 patchlevel 14 May 22, 2003 15 39 1.7.7/game/txt/hlp/pennvOLD.hlp
r427 r429 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 4421 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4420 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 4421 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 4422 4422 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 4423 4423 1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1.7.7/game/txt/index-files.pl
r425 r429 18 18 use strict; 19 19 use Getopt::Long; 20 use locale; 20 21 my (@entries, @aentries); 21 22 1.7.7/hdrs/attrib.h
r427 r429 56 56 extern int string_to_atrflag(dbref player, const char *p); 57 57 extern void init_atr_name_tree(void); 58 extern unsigned c har *constatr_get_compressed_data(ATTR *atr);59 extern char * constatr_value(ATTR *atr);58 extern unsigned const char *atr_get_compressed_data(ATTR *atr); 59 extern char *atr_value(ATTR *atr); 60 60 extern char *safe_atr_value(ATTR *atr); 61 61 extern void atr_migrate(int amount); 1.7.7/hdrs/switches.h
r427 r429 46 46 #define SWITCH_FOLDERS 45 47 47 #define SWITCH_FORWARD 46 48 #define SWITCH_FSTATS 47 49 #define SWITCH_FULL 48 50 #define SWITCH_FUNCTIONS 49 51 #define SWITCH_FWD 50 52 #define SWITCH_GAG 51 53 #define SWITCH_GLOBALS 52 54 #define SWITCH_HEADER 53 55 #define SWITCH_HERE 54 56 #define SWITCH_HIDE 55 57 #define SWITCH_ILIST 56 58 #define SWITCH_INVENTORY 57 59 #define SWITCH_IPRINT 58 60 #define SWITCH_JOIN 59 61 #define SWITCH_LIST 60 62 #define SWITCH_LOWERCASE 61 63 #define SWITCH_ME 62 64 #define SWITCH_MEMBERS 63 65 #define SWITCH_MOD 64 66 #define SWITCH_MORTAL 65 67 #define SWITCH_MOTD 66 68 #define SWITCH_MUTE 67 69 #define SWITCH_NAME 68 70 #define SWITCH_NO 69 71 #define SWITCH_NOEVAL 70 72 #define SWITCH_NOFLAGCOPY 71 73 #define SWITCH_NOISY 72 74 #define SWITCH_NOSIG 73 75 #define SWITCH_NOSPACE 74 76 #define SWITCH_NOTIFY 75 77 #define SWITCH_NUKE 76 78 #define SWITCH_OFF 77 79 #define SWITCH_ON 78 80 #define SWITCH_OUTSIDE 79 81 #define SWITCH_OVERRIDE 80 82 #define SWITCH_PAGING 81 83 #define SWITCH_PANIC 82 84 #define SWITCH_PARANOID 83 85 #define SWITCH_PLAYERS 84 86 #define SWITCH_PORT 85 87 #define SWITCH_PRESERVE 86 88 #define SWITCH_PRINT 87 89 #define SWITCH_PRIVS 88 90 #define SWITCH_PURGE 89 91 #define SWITCH_QUICK 90 92 #define SWITCH_QUIET 91 93 #define SWITCH_READ 92 94 #define SWITCH_REBOOT 93 95 #define SWITCH_RECALL 94 96 #define SWITCH_REGIONS 95 97 #define SWITCH_REGISTER 96 98 #define SWITCH_REMOVE 97 99 #define SWITCH_RENAME 98 100 #define SWITCH_RESTORE 99 101 #define SWITCH_RESTRICT 100 102 #define SWITCH_RETROACTIVE 101 103 #define SWITCH_ROOM 102 104 #define SWITCH_ROOMS 103 105 #define SWITCH_SEE 104 106 #define SWITCH_SEEFLAG 105 107 #define SWITCH_SELF 106 108 #define SWITCH_SEND 107 109 #define SWITCH_SET 108 110 #define SWITCH_SILENT 109 111 #define SWITCH_SKIPDEFAULTS 110 112 #define SWITCH_SPEAK 111 113 #define SWITCH_STATS 112 114 #define SWITCH_SUMMARY 113 115 #define SWITCH_TABLES 114 116 #define SWITCH_TAG 115 117 #define SWITCH_TELEPORT 116 118 #define SWITCH_TF 117 119 #define SWITCH_THINGS 118 120 #define SWITCH_TITLE 119 121 #define SWITCH_TRACE 120 122 #define SWITCH_UNCLEAR 121 123 #define SWITCH_UNFOLDER 122 124 #define SWITCH_UNGAG 123 125 #define SWITCH_UNHIDE 124 126 #define SWITCH_UNMUTE 125 127 #define SWITCH_UNTAG 126 128 #define SWITCH_UNTIL 127 129 #define SWITCH_URGENT 128 130 #define SWITCH_USEFLAG 129 131 #define SWITCH_WHAT 130 132 #define SWITCH_WHO 131 133 #define SWITCH_WIPE 132 134 #define SWITCH_WIZ 133 135 #define SWITCH_WIZARD 134 136 #define SWITCH_YES 135 137 #define SWITCH_ZONE 136 48 #define SWITCH_FREESPACE 47 49 #define SWITCH_FSTATS 48 50 #define SWITCH_FULL 49 51 #define SWITCH_FUNCTIONS 50 52 #define SWITCH_FWD 51 53 #define SWITCH_GAG 52 54 #define SWITCH_GLOBALS 53 55 #define SWITCH_HEADER 54 56 #define SWITCH_HERE 55 57 #define SWITCH_HIDE 56 58 #define SWITCH_ILIST 57 59 #define SWITCH_INVENTORY 58 60 #define SWITCH_IPRINT 59 61 #define SWITCH_JOIN 60 62 #define SWITCH_LIST 61 63 #define SWITCH_LOWERCASE 62 64 #define SWITCH_ME 63 65 #define SWITCH_MEMBERS 64 66 #define SWITCH_MOD 65 67 #define SWITCH_MORTAL 66 68 #define SWITCH_MOTD 67 69 #define SWITCH_MUTE 68 70 #define SWITCH_NAME 69 71 #define SWITCH_NO 70 72 #define SWITCH_NOEVAL 71 73 #define SWITCH_NOFLAGCOPY 72 74 #define SWITCH_NOISY 73 75 #define SWITCH_NOSIG 74 76 #define SWITCH_NOSPACE 75 77 #define SWITCH_NOTIFY 76 78 #define SWITCH_NUKE 77 79 #define SWITCH_OFF 78 80 #define SWITCH_ON 79 81 #define SWITCH_OUTSIDE 80 82 #define SWITCH_OVERRIDE 81 83 #define SWITCH_PAGING 82 84 #define SWITCH_PANIC 83 85 #define SWITCH_PARANOID 84 86 #define SWITCH_PLAYERS 85 87 #define SWITCH_PORT 86 88 #define SWITCH_PRESERVE 87 89 #define SWITCH_PRINT 88 90 #define SWITCH_PRIVS 89 91 #define SWITCH_PURGE 90 92 #define SWITCH_QUICK 91 93 #define SWITCH_QUIET 92 94 #define SWITCH_READ 93 95 #define SWITCH_REBOOT 94 96 #define SWITCH_RECALL 95 97 #define SWITCH_REGIONS 96 98 #define SWITCH_REGISTER 97 99 #define SWITCH_REMOVE 98 100 #define SWITCH_RENAME 99 101 #define SWITCH_RESTORE 100 102 #define SWITCH_RESTRICT 101 103 #define SWITCH_RETROACTIVE 102 104 #define SWITCH_ROOM 103 105 #define SWITCH_ROOMS 104 106 #define SWITCH_SEE 105 107 #define SWITCH_SEEFLAG 106 108 #define SWITCH_SELF 107 109 #define SWITCH_SEND 108 110 #define SWITCH_SET 109 111 #define SWITCH_SILENT 110 112 #define SWITCH_SKIPDEFAULTS 111 113 #define SWITCH_SPEAK 112 114 #define SWITCH_STATS 113 115 #define SWITCH_SUMMARY 114 116 #define SWITCH_TABLES 115 117 #define SWITCH_TAG 116 118 #define SWITCH_TELEPORT 117 119 #define SWITCH_TF 118 120 #define SWITCH_THINGS 119 121 #define SWITCH_TITLE 120 122 #define SWITCH_TRACE 121 123 #define SWITCH_UNCLEAR 122 124 #define SWITCH_UNFOLDER 123 125 #define SWITCH_UNGAG 124 126 #define SWITCH_UNHIDE 125 127 #define SWITCH_UNMUTE 126 128 #define SWITCH_UNTAG 127 129 #define SWITCH_UNTIL 128 130 #define SWITCH_URGENT 129 131 #define SWITCH_USEFLAG 130 132 #define SWITCH_WHAT 131 133 #define SWITCH_WHO 132 134 #define SWITCH_WIPE 133 135 #define SWITCH_WIZ 134 136 #define SWITCH_WIZARD 135 137 #define SWITCH_YES 136 138 #define SWITCH_ZONE 137 1.7.7/hdrs/version.h
r427 r429 1 #define VERSION "PennMUSH version 1.7.7 patchlevel 1 4 [05/22/2003]"2 #define SHORTVN "PennMUSH 1.7.7p1 4"3 #define NUMVERSION 00100700701 41 #define VERSION "PennMUSH version 1.7.7 patchlevel 15 [06/01/2003]" 2 #define SHORTVN "PennMUSH 1.7.7p15" 3 #define NUMVERSION 001007007015 1.7.7/src/attrib.c
r427 r429 31 31 #include "confmagic.h" 32 32 33 #ifdef WIN32 34 #pragma warning( disable : 4761) /* disable warning re conversion */ 35 #endif 36 37 33 38 /** A string tree that temporarily stores matching attributes from current 34 39 * and parent objects when we're searching for commands on attributes … … 392 397 return NULL; 393 398 399 ancestor = Ancestor_Parent(thing); 394 400 for (parent_depth = 0, temp = thing; 395 401 parent_depth < MAX_PARENTS && temp != NOTHING; … … 399 405 */ 400 406 if (temp == ancestor) 401 ancestor = -1;407 ancestor = NOTHING; 402 408 for (ptr = List(temp); ptr; ptr = AL_NEXT(ptr)) { 403 409 comp = strcoll(atr, AL_NAME(ptr)); … … 413 419 } 414 420 /* If we have a valid ancestor, search it as well */ 415 ancestor = Ancestor_Parent(thing);416 421 if (GoodObject(ancestor)) { 417 422 for (parent_depth = 0, temp = ancestor; … … 441 446 parent_depth < MAX_PARENTS && temp != NOTHING; 442 447 parent_depth++, temp = Parent(temp)) { 443 /* If the ancestor of the object is in its explict parent chain,444 * we use it there, and don't check the ancestor later445 */446 if (temp == ancestor)447 ancestor = -1;448 448 for (ptr = List(temp); ptr; ptr = AL_NEXT(ptr)) { 449 449 comp = strcoll(atr, AL_NAME(ptr)); … … 1075 1075 * \return a pointer to the compressed data, in a static buffer. 1076 1076 */ 1077 unsigned char *const1077 unsigned char const * 1078 1078 atr_get_compressed_data(ATTR *atr) 1079 1079 { … … 1092 1092 * \return a pointer to the uncompressed data, in a static buffer. 1093 1093 */ 1094 char * const1094 char * 1095 1095 atr_value(ATTR *atr) 1096 1096 { 1.7.7/src/bsd.c
r427 r429 966 966 967 967 static void 968 shovechars(Port_t port, Port_t sslport )968 shovechars(Port_t port, Port_t sslport __attribute__ ((__unused__))) 969 969 { 970 970 /* this is the main game loop */ … … 3249 3249 strcpy(poll_msg, "Doing"); 3250 3250 if (ShowAnsi(call_by->player)) 3251 sprintf(tbuf2, "% s %s %s %s%s\n",3251 sprintf(tbuf2, "%-16s %10s %6s %s%s\n", 3252 3252 T("Player Name"), T("On For"), T("Idle"), poll_msg, ANSI_NORMAL); 3253 3253 else 3254 sprintf(tbuf2, "% s %s %s %s\n",3254 sprintf(tbuf2, "%-16s %10s %6s %s\n", 3255 3255 T("Player Name"), T("On For"), T("Idle"), poll_msg); 3256 3256 queue_string(call_by, tbuf2); 3257 3257 } else if (doing == 2) { 3258 sprintf(tbuf2, "% s %s %s %s %sDes Sent Recv Pend\n",3258 sprintf(tbuf2, "%-16s %6s %9s %5s %5s Des Sent Recv Pend\n", 3259 3259 T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); 3260 3260 queue_string(call_by, tbuf2); 3261 3261 } else { 3262 sprintf(tbuf2, "% s %s %s %s %s Des Host\n",3262 sprintf(tbuf2, "%-16s %6s %9s %5s %5s Des Host\n", 3263 3263 T("Player Name"), T("Loc #"), T("On For"), T("Idle"), T("Cmds")); 3264 3264 queue_string(call_by, tbuf2); … … 3292 3292 } else if (call_by->connected && doing == 2 && call_by->player 3293 3293 && Priv_Who(call_by->player)) { 3294 sprintf(tbuf1, "%-16s % 5s %9s %5s %5d %4d %5lu %7lu %5d",3294 sprintf(tbuf1, "%-16s %6s %9s %5s %5d %3d %5lu %7lu %5d", 3295 3295 Name(d->player), unparse_dbref(Location(d->player)), 3296 3296 time_format_1(now - d->connected_at), … … 3923 3923 { 3924 3924 /* returns a list of the network descriptors that a player is 3925 * connected to (wizard-only)3925 * connected to 3926 3926 */ 3927 3927 … … 3929 3929 DESC *d; 3930 3930 int first; 3931 if (!Hasprivs(executor)) { 3931 3932 if (!Priv_Who(executor)) { 3932 3933 notify(executor, T("Permission denied.")); 3933 3934 return; 1.7.7/src/chunk.c
r427 r429 224 224 #include <assert.h> 225 225 #include <sys/types.h> 226 #ifdef WIN32 227 #include <io.h> 228 #else 226 229 #include <unistd.h> 230 #endif 227 231 228 232 #include "chunk.h" … … 234 238 #include "mymalloc.h" 235 239 #include "confmagic.h" 240 241 #ifdef WIN32 242 #pragma warning( disable : 4761) /* disable warning re conversion */ 243 #endif 236 244 237 245 /* A whole bunch of debugging #defines. */ … … 529 537 * When the deref counts get too big, the current period is incremented 530 538 * and all derefs are divided by 2. */ 531 static u_int curr_period;539 static u_int_32 curr_period; 532 540 533 541 /* 534 542 * Info about all regions 535 543 */ 536 static u_int region_count; /**< regions in use */537 static u_int region_array_len; /**< length of regions array */544 static u_int_32 region_count; /**< regions in use */ 545 static u_int_32 region_array_len; /**< length of regions array */ 538 546 static Region *regions; /**< regions array, realloced as (rarely) needed */ 539 547 … … 541 549 * regions presently in memory 542 550 */ 543 static u_int cached_region_count; /**< number of regions in cache */551 static u_int_32 cached_region_count; /**< number of regions in cache */ 544 552 static RegionHeader *cache_head; /**< most recently used region */ 545 553 static RegionHeader *cache_tail; /**< least recently used region */ … … 581 589 static u_int_16 *m_length; /**< The lengths of the chunks to be moved. */ 582 590 static u_int_16 *m_unhappiness; /**< The unhappiness of the chunks. */ 583 static u _char *m_derefs; /**< The dereferences for the chunks. */591 static unsigned char *m_derefs; /**< The dereferences for the chunks. */ 584 592 static int m_limit; /**< The number of migrates allowed. */ 585 593 … … 1506 1514 chunk_reference_t *t_r; 1507 1515 u_int_16 t_l, t_u; 1508 u _char t_d;1516 unsigned char t_d; 1509 1517 1510 1518 for (j = 1; j < m_count; j++) { … … 2018 2026 notify(player, s); \ 2019 2027 else \ 2020 do_rawlog(LT_TRACE, s); \2028 do_rawlog(LT_TRACE, "%s", s); \ 2021 2029 } while (0) 2022 2030 … … 2088 2096 */ 2089 2097 static void 2090 chunk_histogram(dbref player, int *histogram, char const *legend)2098 chunk_histogram(dbref player, int const *histogram, char const *legend) 2091 2099 { 2092 2100 const char *s; … … 2146 2154 pen = j + strlen(num) + 1; 2147 2155 } else { 2148 if (j - strlen(num) < pen)2156 if (j - (int) strlen(num) < pen) 2149 2157 ante = 18; 2150 2158 else … … 2170 2178 * \return histogram data for the regions. 2171 2179 */ 2172 static int *const2180 static int const * 2173 2181 chunk_regionhist(void) 2174 2182 { … … 2187 2195 * \return histogram data for the free space. 2188 2196 */ 2189 static int *const2197 static int const * 2190 2198 chunk_freehist(void) 2191 2199 { 1.7.7/src/flags.c
r427 r429 709 709 /** Locate a specific bit within a byte given a bit position */ 710 710 #define FlagBit(x) (7 - (x % 8)) 711 /** How many bytes do we need for a flag bitmask? */ 712 #define FlagBytes ((size_t)((flagbits + 7) / 8)) 711 713 712 714 /** Allocate a new flag bitmask. … … 720 722 { 721 723 object_flag_type bitmask; 722 int flagbytes = (flagbits + 7) / 8; /* Rounds up to nearest byte */ 723 bitmask = (object_flag_type) mush_malloc(flagbytes, "flag_bitmask"); 724 bitmask = (object_flag_type) mush_malloc(FlagBytes, "flag_bitmask"); 724 725 if (!bitmask) 725 726 panic("Unable to allocate memory for flag bitmask"); 726 memset(bitmask, 0, flagbytes);727 memset(bitmask, 0, FlagBytes); 727 728 return bitmask; 728 729 } … … 739 740 { 740 741 object_flag_type bitmask; 741 int flagbytes = 1 + flagbits / 8; 742 bitmask = (object_flag_type) mush_malloc(flagbytes, "flag_bitmask"); 742 bitmask = (object_flag_type) mush_malloc(FlagBytes, "flag_bitmask"); 743 743 if (!bitmask) 744 744 panic("Unable to allocate memory for flag bitmask"); 745 memcpy(bitmask, given, flagbytes);745 memcpy(bitmask, given, FlagBytes); 746 746 return bitmask; 747 747 } … … 756 756 copy_flag_bitmask(object_flag_type dest, object_flag_type given) 757 757 { 758 int flagbytes = 1 + flagbits / 8; 759 memcpy((void *) dest, (void *) given, flagbytes); 758 memcpy((void *) dest, (void *) given, FlagBytes); 760 759 } 761 760 … … 837 836 unsigned int i; 838 837 int ok = 1; 839 unsigned int flagbytes = 1 + flagbits / 8; 840 for (i = 0; i < flagbytes; i++) 838 for (i = 0; i < FlagBytes; i++) 841 839 ok &= ((*(bitmask + i) & *(source + i)) == *(bitmask + i)); 842 840 return ok; … … 853 851 unsigned int i; 854 852 int bad = 0; 855 unsigned int flagbytes = 1 + flagbits / 8; 856 for (i = 0; i < flagbytes; i++) 853 for (i = 0; i < FlagBytes; i++) 857 854 bad |= *(source + i); 858 855 return (!bad); … … 872 869 unsigned int i; 873 870 int ok = 0; 874 unsigned int flagbytes = 1 + flagbits / 8; 875 for (i = 0; i < flagbytes; i++) 871 for (i = 0; i < FlagBytes; i++) 876 872 ok |= (*(bitmask + i) & *(source + i)); 877 873 return ok; 1.7.7/src/look.c
r427 r429 41 41 static void look_atrs(dbref player, dbref thing, const char *mstr, int all); 42 42 static void look_simple(dbref player, dbref thing); 43 static void look_description(dbref player, dbref thing, c har *def,43 static void look_description(dbref player, dbref thing, const char *def, 44 44 const char *descname, const char *descformatname); 45 45 static int decompile_helper … … 483 483 484 484 static void 485 look_description(dbref player, dbref thing, c har *def, const char *descname,486 const char *desc formatname)485 look_description(dbref player, dbref thing, const char *def, 486 const char *descname, const char *descformatname) 487 487 { 488 488 /* Show thing's description to player, obeying DESCFORMAT if set */ 1.7.7/src/mysocket.c
r427 r429 476 476 */ 477 477 478 static const char *inet_ntop4(const u _char *src, char *dst, size_t size);479 static const char *inet_ntop6(const u _char *src, char *dst, size_t size);478 static const char *inet_ntop4(const unsigned char *src, char *dst, size_t size); 479 static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size); 480 480 481 481 /* char * … … 509 509 * notes: 510 510 * (1) uses no statics 511 * (2) takes a u _char* not an in_addr as input511 * (2) takes a unsigned char* not an in_addr as input 512 512 * author: 513 513 * Paul Vixie, 1996. 514 514 */ 515 515 static const char * 516 inet_ntop4(const u _char *src, char *dst, size_t size)516 inet_ntop4(const unsigned char *src, char *dst, size_t size) 517 517 { 518 518 static const char fmt[] = "%u.%u.%u.%u"; … … 535 535 */ 536 536 static const char * 537 inet_ntop6(const u _char *src, char *dst, size_t size)537 inet_ntop6(const unsigned char *src, char *dst, size_t size) 538 538 { 539 539 /* … … 548 548 int base, len; 549 549 } best, cur; 550 u _int words[IN6ADDRSZ / INT16SZ];550 unsigned int words[IN6ADDRSZ / INT16SZ]; 551 551 int i; 552 552 … … 648 648 */ 649 649 650 static int inet_pton4(const char *src, u _char *dst);651 static int inet_pton6(const char *src, u _char *dst);650 static int inet_pton4(const char *src, unsigned char *dst); 651 static int inet_pton6(const char *src, unsigned char *dst); 652 652 653 653 /* int … … 688 688 */ 689 689 static int 690 inet_pton4(const char *src, u _char *dst)690 inet_pton4(const char *src, unsigned char *dst) 691 691 { 692 692 static const char digits[] = "0123456789"; 693 693 int saw_digit, octets, ch; 694 u _char tmp[INADDRSZ], *tp;694 unsigned char tmp[INADDRSZ], *tp; 695 695 696 696 saw_digit = 0; … … 701 701 702 702 if ((pch = strchr(digits, ch)) != NULL) { 703 u _int new = *tp * 10 + (pch - digits);703 unsigned int new = *tp * 10 + (pch - digits); 704 704 705 705 if (new > 255) … … 740 740 */ 741 741 static int 742 inet_pton6(const char *src, u _char *dst)742 inet_pton6(const char *src, unsigned char *dst) 743 743 { 744 744 static const char xdigits_l[] = "0123456789abcdef", 745 745 xdigits_u[] = "0123456789ABCDEF"; 746 u _char tmp[IN6ADDRSZ], *tp, *endp, *colonp;746 unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp; 747 747 const char *xdigits, *curtok; 748 748 int ch, saw_xdigit; 749 u _int val;749 unsigned int val; 750 750 751 751 memset((tp = tmp), 0, IN6ADDRSZ); … … 782 782 if (tp + INT16SZ > endp) 783 783 return (0); 784 *tp++ = (u _char) (val >> 8) & 0xff;785 *tp++ = (u _char) val & 0xff;784 *tp++ = (unsigned char) (val >> 8) & 0xff; 785 *tp++ = (unsigned char) val & 0xff; 786 786 saw_xdigit = 0; 787 787 val = 0; … … 798 798 if (tp + INT16SZ > endp) 799 799 return (0); 800 *tp++ = (u _char) (val >> 8) & 0xff;801 *tp++ = (u _char) val & 0xff;800 *tp++ = (unsigned char) (val >> 8) & 0xff; 801 *tp++ = (unsigned char) val & 0xff; 802 802 } 803 803 if (colonp != NULL) { 1.7.7/src/set.c
r427 r429 357 357 * this allows players to @chzone themselves to an object they own. 358 358 */ 359 if (! Wizard(player) && !Owns(player, thing)) {359 if (!(God(player) || (!God(thing) && Wizard(player)) || Owns(player, thing))) { 360 360 if (noisy) 361 361 notify(player, T("You don't have the power to shift reality.")); … … 472 472 ((*af->flag == NOT_TOKEN) && (af->f == AF_SAFE) && 473 473 Can_Write_Attr_Ignore_Safe(player, thing, AL_ATTR(atr))))) { 474 notify_format(player, T("You cannot set %s/%s"), Name(thing), AL_NAME(atr)); 475 return 0; 476 } 477 if (*af->flag == NOT_TOKEN) 474 notify_format(player, T("You cannot change that flag on %s/%s"), 475 Name(thing), AL_NAME(atr)); 476 return 0; 477 } 478 479 if (*af->flag == NOT_TOKEN) { 478 480 AL_FLAGS(atr) &= ~af->f; 479 else 481 if (!Quiet(player) && !(Quiet(thing) && (Owner(thing) == player))) 482 notify_format(player, T("%s/%s - %s reset."), Name(thing), AL_NAME(atr), 483 (af->flag + 1)); 484 } else { 480 485 AL_FLAGS(atr) |= af->f; 481 482 if (!Quiet(player) && !(Quiet(thing) && (Owner(thing) == player))) 483 notify_format(player, "%s/%s - Set.", Name(thing), AL_NAME(atr)); 486 if (!Quiet(player) && !(Quiet(thing) && (Owner(thing) == player))) 487 notify_format(player, T("%s/%s - %s set."), Name(thing), AL_NAME(atr), 488 af->flag); 489 } 484 490 485 491 return 1; 1.7.7/src/switchinc.c
r427 r429 46 46 {"FOLDERS", SWITCH_FOLDERS}, 47 47 {"FORWARD", SWITCH_FORWARD}, 48 {"FREESPACE", SWITCH_FREESPACE}, 48 49 {"FSTATS", SWITCH_FSTATS}, 49 50 {"FULL", SWITCH_FULL}, … … 136 137 {"YES", SWITCH_YES}, 137 138 {"ZONE", SWITCH_ZONE}, 138 {NULL, 0}139 {NULL, 0} 139 140 }; 1.7.7/win32/funs.h
r427 r429 319 319 FUNCTION_PROTO(fun_zfun); 320 320 FUNCTION_PROTO(fun_zone); 321 FUNCTION_PROTO(local_fun_silly);
