Changeset 453
- Timestamp:
- 08/16/06 00:48:06 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.176 (modified) (1 diff)
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/Configure (modified) (11 diffs)
- 1.7.7/INSTALL (modified) (1 diff)
- 1.7.7/MANIFEST (modified) (1 diff)
- 1.7.7/Makefile.SH (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/txt/hlp/pennfunc.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/hdrs/externs.h (modified) (2 diffs)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/hints/freebsd.sh (modified) (1 diff)
- 1.7.7/po/Makefile (modified) (1 diff)
- 1.7.7/src/Makefile.SH (added)
- 1.7.7/src/bsd.c (modified) (3 diffs)
- 1.7.7/src/extchat.c (modified) (3 diffs)
- 1.7.7/src/funlist.c (modified) (1 diff)
- 1.7.7/src/funmisc.c (modified) (2 diffs)
- 1.7.7/src/funtime.c (modified) (2 diffs)
- 1.7.7/src/game.c (modified) (1 diff)
- 1.7.7/src/mysocket.c (modified) (1 diff)
- 1.7.7/src/notify.c (modified) (1 diff)
- 1.7.7/src/predicat.c (modified) (5 diffs)
- 1.7.7/src/set.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.176
r441 r453 13 13 14 14 ========================================================================== 15 16 Version 1.7.6 patchlevel 15 January 25, 2004 17 18 Fixes: 19 * Improved freebsd hints. [SW] 20 * Channel user memory allocation error corrected. 21 15 22 16 23 Version 1.7.6 patchlevel 14 September 23, 2003 1.7.7/CHANGES.177
r451 r453 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 27 January 25, 2004 22 23 Minor Changes: 24 * New etimefmt() formatting codes to make it easier to get nice-looking 25 results without 0-valued times. Suggested by ranko_usa@M*U*S*H. [SW] 26 * Autodetect existence of /usr/kerberos/include to make compile 27 easier for RH9 sufferers. 28 * src/Makefile is now autobuilt from src/Makefile.SH. IF you use 29 local hacks that require src/Makefile, this is likely to be a problem 30 for you. You'll want to start patching Makefile.SH instead. 31 * Fewer warning flags are now provided to the compiler by default. 32 You can set your own warning flags instead by defining the 33 warnings variable in config.over. 34 Fixes: 35 * The startups option actually does what it's supposed to now. 36 * Potential DOS in etimefmt fixed. Report by Ashen-Shugar. [SW] 37 * Code cleanup. ok_tag_attribute should work. [SW] 38 * Channels are automatically ungagged only on initial connection 39 (not reconnection, partial disconnection, etc.). Suggested by 40 Mordie@M*U*S*H. 41 * notify() calls during startup would crash. Reported by Mordie@M*U*S*H. [SW] 42 * Fixes from 1.7.6p15. 43 20 44 21 45 Version 1.7.7 patchlevel 26 December 15, 2003 1.7.7/Configure
r451 r453 259 259 ldflags='' 260 260 lkflags='' 261 locincpth='' 261 262 optimize='' 263 warnings='' 262 264 cdecl='' 263 265 cf_email='' … … 578 580 defvoidused=15 579 581 582 : Possible local include directories to search. 583 : Set locincpth to "" in a hint file to defeat local include searches. 584 locincpth="/usr/local/include /opt/local/include /usr/gnu/include" 585 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" 586 locincpth="$locincpth /usr/kerberos/include" 587 : 580 588 : no include file wanted by default 581 589 inclwanted='' … … 2647 2655 2*) dflt='-g -O' ;; 2648 2656 *egcs*) dflt='-g -O' ;; 2649 *) dflt='-g' ;; 2650 esac 2651 ;; 2657 *) dflt='-g' ;; 2658 esac ;; 2652 2659 *) dflt="$optimize";; 2653 2660 esac 2654 2661 $cat <<EOH 2655 2662 2656 Some C compilers have problems with their optimizers. By default, $package2657 compiles with only the -g flag to use the debugger, unless you're using gcc,2658 in which case $package compiles with -g -O to use both the optimizer and 2659 the debugger. If you'd prefer to specify something else, do it here. 2660 To use neither flag, specifythe word "none".2663 Some C compilers have problems with their optimizers. By default, $package 2664 compiles with the -O flag to use the optimizer. Alternately, you might want 2665 to use the symbolic debugger, which uses the -g flag (on traditional Unix 2666 systems). Either flag can be specified here. To use neither flag, specify 2667 the word "none". 2661 2668 2662 2669 EOH … … 2668 2675 esac 2669 2676 2677 case "$warnings" in 2678 ' ') dflt='none';; 2679 '') case $gccversion in 2680 2*|egcs*) dflt='-W -Wall -Wno-comment' ;; 2681 *) dflt='none' ;; 2682 esac ;; 2683 *) dflt="$warnings";; 2684 esac 2685 $cat <<EOH 2686 2687 EOH 2688 rp="What compiler warning flags should be used?" 2689 . ./myread 2690 warnings="$ans" 2691 case "$warnings" in 2692 'none') warnings=" ";; 2693 esac 2694 2670 2695 dflt='' 2671 case "$ccflags" in 2672 '') 2696 : We will not override a previous value, but we might want to 2697 : augment a hint file 2698 case "$hint" in 2699 none|recommended) 2673 2700 case "$gccversion" in 2674 2701 1*) dflt='-fpcc-struct-return' ;; … … 2686 2713 2687 2714 case "$mips_type" in 2688 *BSD*) ;; 2689 '') ;; 2690 *) inclwanted="$inclwanted $usrinc/bsd";; 2715 *BSD*|'') inclwanted="$locincpth $usrinc";; 2716 *) inclwanted="$locincpth $inclwanted $usrinc/bsd";; 2691 2717 esac 2692 2718 for thisincl in $inclwanted; do … … 2720 2746 set signal.h LANGUAGE_C; eval $inctest 2721 2747 fi 2722 set signal.h NO_PROTOTYPE; eval $inctest 2723 set signal.h _NO_PROTO; eval $inctest 2748 2749 case "$hint" in 2750 none|recommended) dflt="$ccflags $dflt" ;; 2751 *) dflt="$ccflags";; 2752 esac 2724 2753 2725 2754 case "$dflt" in 2726 '') dflt=none;; 2727 esac 2728 case "$ccflags" in 2729 '') ;; 2730 *) dflt="$ccflags";; 2755 ''|' ') dflt=none;; 2731 2756 esac 2732 2757 $cat <<EOH … … 2734 2759 Your C compiler may want other flags. For this question you should include 2735 2760 -I/whatever and -DWHATEVER flags and any other flags used by the C compiler, 2736 but you should NOT include libraries or ld flags like -lwhatever. 2737 If your system had hints, the defaults are usually correct. 2761 but you should NOT include libraries or ld flags like -lwhatever. If you 2762 want $package to honor its debug switch, you should include -DDEBUG here. 2763 2738 2764 To use no flags, specify the word "none". 2739 2765 2740 2766 EOH 2741 case "$gccversion" in2742 2*)2743 pennmushgccflags="-Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith"2744 case "$dflt" in2745 'none') dflt="$pennmushgccflags" ;;2746 *-W*) ;;2747 *) dflt="$dflt $pennmushgccflags" ;;2748 esac2749 ;;2750 egcs*)2751 pennmushgccflags="-Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith"2752 case "$dflt" in2753 'none') dflt="$pennmushgccflags" ;;2754 *-W*) ;;2755 *) dflt="$dflt $pennmushgccflags" ;;2756 esac2757 ;;2758 esac2759 2767 set X $dflt 2760 2768 shift … … 2826 2834 dflt='' 2827 2835 fi 2828 for thislibpth in $libpth; do2829 if $test -d $thislibpth; then2830 case "$dflt" in2831 *$thislibpth*) ;;2832 *) dflt="$dflt -L$thislibpth";;2833 esac2834 fi2835 done2836 2836 case "$ccflags" in 2837 2837 *-posix*) dflt="$dflt -posix" ;; 2838 2838 esac 2839 case "$dflt" in 2840 '') dflt='none' ;; 2839 ;; 2840 *) dflt="$ldflags";; 2841 esac 2842 2843 : Try to guess additional flags to pick up local libraries. 2844 for thislibdir in $libpth; do 2845 case " $loclibpth " in 2846 *" $thislibdir "*) 2847 case "$dflt " in 2848 *"-L$thislibdir "*) ;; 2849 *) dflt="$dflt -L$thislibdir" ;; 2850 esac 2851 ;; 2841 2852 esac 2842 ;; 2843 *) dflt="$ldflags";; 2844 esac 2845 echo " " 2853 done 2854 2855 case "$dflt" in 2856 '') dflt='none' ;; 2857 esac 2858 2859 $cat <<EOH 2860 2861 Your C linker may need flags. For this question you should 2862 include -L/whatever and any other flags used by the C linker, but you 2863 should NOT include libraries like -lwhatever. 2864 2865 Make sure you include the appropriate -L/path flags if your C linker 2866 does not normally search all of the directories you specified above, 2867 namely 2868 $libpth 2869 To use no flags, specify the word "none". 2870 2871 EOH 2872 2846 2873 rp="Any additional ld flags (NOT including libraries)?" 2847 2874 . ./myread … … 2868 2895 $cat > try.c <<'EOF' 2869 2896 #include <stdio.h> 2870 intmain() { exit(0); }2897 main() { exit(0); } 2871 2898 EOF 2872 2899 dflt=y 2873 if sh -c "$cc $optimize $ccflags $ldflags try.c -o try" >>try.msg 2>&1; then2900 if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then 2874 2901 if sh -c './try' >>try.msg 2>&1; then 2875 2902 dflt=n … … 7032 7059 ln='$ln' 7033 7060 lns='$lns' 7061 locincpth='$locincpth' 7034 7062 loclibpth='$loclibpth' 7035 7063 lp='$lp' … … 7114 7142 vi='$vi' 7115 7143 voidflags='$voidflags' 7144 warnings='$warnings' 7116 7145 xlibpth='$xlibpth' 7117 7146 zcat='$zcat' 1.7.7/INSTALL
r433 r453 88 88 89 89 1. On win32 only, install proper tools or read win32/README.txt. 90 2. sh Configure -d 90 2. sh Configure -d or some variant 91 91 3. create options.h, or make update 92 92 4. make install 1.7.7/MANIFEST
r451 r453 49 49 hdrs/strtree.h 50 50 hdrs/version.h 51 src/Makefile 51 src/Makefile.SH 52 52 src/access.c 53 53 src/announce.c 1.7.7/Makefile.SH
r451 r453 48 48 $make_set_make 49 49 CC=$cc 50 CCFLAGS=$optimize -I.. -I../hdrs $ccflags 50 CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings 51 51 LDFLAGS=$ldflags 52 52 CLIBS=$libs $cryptlib $libssl $libcrypto 1.7.7/Patchlevel
r451 r453 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p2 62 This is PennMUSH 1.7.7p27 1.7.7/game/txt/hlp/pennfunc.hlp
r451 r453 3615 3615 a minimum width for the expanded code. The capital letter codes 3616 3616 are the same as the lower case codes if you don't provide a width. 3617 An 'x' before the code (But after any number) will automatically add 3618 a d, h, m, or s suffix to the time, and a 'z' will not display anything 3619 if the field's value is 0. x and z can be combined. 3620 3621 Continued in HELP ETIMEFMT3 3622 & ETIMEFMT3 3623 Some examples: 3624 3625 > think etimefmt($2h:$2M, 3700) 3626 1:01 3627 > think etimefmt(You have $m minutes and $s seconds to go, 78) 3628 You have 1 minutes and 18 seconds to go 3629 > think squish(etimefmt(Connected for $zxd $xzh $zxm $xzs, conn(me))) 3630 Connected for 5h 24m 45s 3617 3631 & TIMEFMT() 3618 3632 timefmt(<format>[, <secs>]) 1.7.7/game/txt/hlp/pennv176.hlp
r441 r453 1 & 1.7.6p15 2 Version 1.7.6 patchlevel 15 January 25, 2004 3 4 Fixes: 5 * Improved freebsd hints. [SW] 6 * Channel user memory allocation error corrected. 7 8 1 9 & 1.7.6p14 2 10 Version 1.7.6 patchlevel 14 September 23, 2003 1.7.7/game/txt/hlp/pennv177.hlp
r451 r453 1 & 1.7.7p2 61 & 1.7.7p27 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 27 January 25, 2004 15 16 Minor Changes: 17 * New etimefmt() formatting codes to make it easier to get nice-looking 18 results without 0-valued times. Suggested by ranko_usa@M*U*S*H. [SW] 19 * Autodetect existence of /usr/kerberos/include to make compile 20 easier for RH9 sufferers. 21 * src/Makefile is now autobuilt from src/Makefile.SH. IF you use 22 local hacks that require src/Makefile, this is likely to be a problem 23 for you. You'll want to start patching Makefile.SH instead. 24 * Fewer warning flags are now provided to the compiler by default. 25 You can set your own warning flags instead by defining the 26 warnings variable in config.over. 27 Fixes: 28 * The startups option actually does what it's supposed to now. 29 * Potential DOS in etimefmt fixed. Report by Ashen-Shugar. [SW] 30 * Code cleanup. ok_tag_attribute should work. [SW] 31 * Channels are automatically ungagged only on initial connection 32 (not reconnection, partial disconnection, etc.). Suggested by 33 Mordie@M*U*S*H. 34 * notify() calls during startup would crash. Reported by Mordie@M*U*S*H. [SW] 35 * Fixes from 1.7.6p15. 36 37 38 & 1.7.7p26 14 39 Version 1.7.7 patchlevel 26 December 15, 2003 15 40 1.7.7/game/txt/hlp/pennvOLD.hlp
r451 r453 4419 4419 4420 4420 1.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 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 4421 19, 20, 21, 22, 23, 24, 25, 26, 27 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 4423 4423 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 4424 4424 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/hdrs/externs.h
r451 r453 120 120 /** A notify_anything lookup function type definition */ 121 121 typedef dbref (*na_lookup) (dbref, void *); 122 extern void notify_anything(dbref speaker, na_lookup func, 123 void *fdata, 124 char *(*nsfunc) (dbref, 125 na_lookup func, 126 void *, int), int flags, 127 const char *message); 122 128 extern void notify_anything_loc(dbref speaker, na_lookup func, 123 129 void *fdata, … … 137 143 #endif 138 144 139 #define notify_anything(speaker, f1, f2, f3, flags, msg) \140 notify_anything_loc(speaker, f1, f2, f3, flags, msg, Location(speaker))141 145 #define notify(p,m) notify_anything(orator, na_one, &(p), NULL, 0, m) 142 146 #define notify_must_puppet(p,m) notify_anything(orator, na_one, &(p), NULL, NA_MUST_PUPPET, m) 1.7.7/hdrs/version.h
r451 r453 1 #define VERSION "PennMUSH version 1.7.7 patchlevel 2 6 [12/15/2003]"2 #define SHORTVN "PennMUSH 1.7.7p2 6"3 #define NUMVERSION 00100700702 61 #define VERSION "PennMUSH version 1.7.7 patchlevel 27 [01/25/2004]" 2 #define SHORTVN "PennMUSH 1.7.7p27" 3 #define NUMVERSION 001007007027 1.7.7/hints/freebsd.sh
r335 r453 1 1 usenm=false 2 inclwanted='/usr/local/include'3 2 i_malloc='undef' 4 3 i_values='undef' 4 ccflags='-D_POSIX_C_SOURCE=2 -I/usr/local/include' 5 d_attribut=true 5 6 1.7.7/po/Makefile
r433 r453 2 2 3 3 POFILES=ru_RU.po nl_NL.po sv_SE.po hu_HU.po es_ES.po pt_BR.po fr_FR.po \ 4 da_DK.po de_DE.po no_NO.po pl_PL.po ro_RO.po 4 da_DK.po de_DE.po no_NO.po pl_PL.po ro_RO.po id_ID.po 5 5 6 6 .pox.po: $*.pox pennmush.pot 1.7.7/src/bsd.c
r451 r453 172 172 int shutdown_flag = 0; /**< Is it time to shut down? */ 173 173 extern int paranoid_dump; /**< Are we doing a paranoid dump? */ 174 void chat_player_announce(dbref player, char *msg );174 void chat_player_announce(dbref player, char *msg, int ungag); 175 175 176 176 static int login_number = 0; … … 3698 3698 3699 3699 #ifdef CHAT_SYSTEM 3700 chat_player_announce(player, tbuf1 );3700 chat_player_announce(player, tbuf1, (num == 1)); 3701 3701 #endif 3702 3702 … … 3835 3835 3836 3836 #ifdef CHAT_SYSTEM 3837 chat_player_announce(player, tbuf1 );3837 chat_player_announce(player, tbuf1, 0); 3838 3838 #endif 3839 3839 1.7.7/src/extchat.c
r451 r453 73 73 static void channel_leave_self(dbref player, const char *name); 74 74 static void do_channel_who(dbref player, CHAN *chan); 75 void chat_player_announce(dbref player, char *msg );75 void chat_player_announce(dbref player, char *msg, int ungag); 76 76 static int ok_channel_name(const char *n); 77 77 static void channel_allocate_buffer(CHAN *c, int lines); … … 2528 2528 2529 2529 /** Tell players on a channel when someone connects or disconnects. 2530 * \param player player t o announce to.2530 * \param player player that is connecting or disconnecting. 2531 2531 * \param msg message to announce. 2532 * \param ungag if 1, remove any channel gags the player has. 2532 2533 */ 2533 2534 void 2534 chat_player_announce(dbref player, char *msg )2535 chat_player_announce(dbref player, char *msg, int ungag) 2535 2536 { 2536 2537 CHAN *c; … … 2550 2551 buff, NULL); 2551 2552 } 2552 CUtype(u) &= ~CU_GAG; 2553 if (ungag) 2554 CUtype(u) &= ~CU_GAG; 2553 2555 } 2554 2556 } 1.7.7/src/funlist.c
r451 r453 1854 1854 { 1855 1855 char c; 1856 int el, count, len ;1856 int el, count, len = -1; 1857 1857 char *sptr, *eptr; 1858 1858 1.7.7/src/funmisc.c
r451 r453 601 601 char tbuf[BUFFER_LEN], *tp; 602 602 char const *sp; 603 char sep ;603 char sep = ' '; 604 604 605 605 tbuf[0] = '\0'; … … 611 611 } else if (*args[nargs]) 612 612 sep = *args[nargs]; 613 else614 sep = ' ';615 613 } 616 614 1.7.7/src/funtime.c
r433 r453 402 402 const char *c; 403 403 char *w; 404 int include_suffix, even_if_0, in_format_flags; 404 405 405 406 days = secs / 86400; … … 418 419 else 419 420 pad = 1; 420 switch (*w) { 421 case '$': 422 if (pad) 423 safe_format(buff, bp, "%*c", width, '$'); 424 else 421 if (width < 0) 422 width = 0; 423 else if (width >= BUFFER_LEN) 424 width = BUFFER_LEN - 1; 425 even_if_0 = in_format_flags = 1; 426 include_suffix = 0; 427 while (in_format_flags) { 428 switch (*w) { 429 case 'x': 430 case 'X': 431 include_suffix = 1; 432 w++; 433 break; 434 case 'z': 435 case 'Z': 436 even_if_0 = 0; 437 w++; 438 break; 439 case '$': 440 in_format_flags = 0; 441 if (pad) 442 safe_format(buff, bp, "%*c", width, '$'); 443 else 444 safe_chr('$', buff, bp); 445 break; 446 case 's': 447 in_format_flags = 0; 448 if (secs || even_if_0) { 449 if (pad) 450 safe_format(buff, bp, "%*lu", width, secs); 451 else 452 safe_uinteger(secs, buff, bp); 453 if (include_suffix) 454 safe_chr('s', buff, bp); 455 } else if (pad) 456 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 457 break; 458 case 'S': 459 in_format_flags = 0; 460 if (secs || even_if_0) { 461 if (pad) 462 safe_format(buff, bp, "%0*lu", width, secs); 463 else 464 safe_format(buff, bp, "%0lu", secs); 465 if (include_suffix) 466 safe_chr('s', buff, bp); 467 } else if (pad) 468 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 469 break; 470 case 'm': 471 in_format_flags = 0; 472 if (mins || even_if_0) { 473 if (pad) 474 safe_format(buff, bp, "%*d", width, mins); 475 else 476 safe_integer(mins, buff, bp); 477 if (include_suffix) 478 safe_chr('m', buff, bp); 479 } else if (pad) 480 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 481 break; 482 case 'M': 483 in_format_flags = 0; 484 if (mins || even_if_0) { 485 if (pad) 486 safe_format(buff, bp, "%0*d", width, mins); 487 else 488 safe_format(buff, bp, "%0d", mins); 489 if (include_suffix) 490 safe_chr('m', buff, bp); 491 } else if (pad) 492 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 493 break; 494 case 'h': 495 in_format_flags = 0; 496 if (hours || even_if_0) { 497 if (pad) 498 safe_format(buff, bp, "%*d", width, hours); 499 else 500 safe_integer(hours, buff, bp); 501 if (include_suffix) 502 safe_chr('h', buff, bp); 503 } else if (pad) 504 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 505 break; 506 case 'H': 507 in_format_flags = 0; 508 if (hours || even_if_0) { 509 if (pad) 510 safe_format(buff, bp, "%0*d", width, hours); 511 else 512 safe_format(buff, bp, "%0d", hours); 513 if (include_suffix) 514 safe_chr('h', buff, bp); 515 } else if (pad) 516 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 517 break; 518 case 'd': 519 in_format_flags = 0; 520 if (days || even_if_0) { 521 if (pad) 522 safe_format(buff, bp, "%*d", width, days); 523 else 524 safe_integer(days, buff, bp); 525 if (include_suffix) 526 safe_chr('d', buff, bp); 527 } else if (pad) 528 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 529 break; 530 case 'D': 531 in_format_flags = 0; 532 if (days || even_if_0) { 533 if (pad) 534 safe_format(buff, bp, "%0*d", width, days); 535 else 536 safe_format(buff, bp, "%0d", days); 537 if (include_suffix) 538 safe_chr('d', buff, bp); 539 } else if (pad) 540 safe_fill(' ', width + (include_suffix ? 1 : 0), buff, bp); 541 break; 542 default: 543 in_format_flags = 0; 425 544 safe_chr('$', buff, bp); 426 break; 427 case 's': 428 if (pad) 429 safe_format(buff, bp, "%*lu", width, secs); 430 else 431 safe_uinteger(secs, buff, bp); 432 break; 433 case 'S': 434 if (pad) 435 safe_format(buff, bp, "%0*lu", width, secs); 436 else 437 safe_format(buff, bp, "%0lu", secs); 438 break; 439 case 'm': 440 if (pad) 441 safe_format(buff, bp, "%*d", width, mins); 442 else 443 safe_integer(mins, buff, bp); 444 break; 445 case 'M': 446 if (pad) 447 safe_format(buff, bp, "%0*d", width, mins); 448 else 449 safe_format(buff, bp, "%0d", mins); 450 break; 451 case 'h': 452 if (pad) 453 safe_format(buff, bp, "%*d", width, hours); 454 else 455 safe_integer(hours, buff, bp); 456 break; 457 case 'H': 458 if (pad) 459 safe_format(buff, bp, "%0*d", width, hours); 460 else 461 safe_format(buff, bp, "%0d", hours); 462 break; 463 case 'd': 464 if (pad) 465 safe_format(buff, bp, "%*d", width, days); 466 else 467 safe_integer(days, buff, bp); 468 break; 469 case 'D': 470 if (pad) 471 safe_format(buff, bp, "%0*d", width, days); 472 else 473 safe_format(buff, bp, "%0d", days); 474 break; 475 default: 476 safe_chr('$', buff, bp); 477 for (; c != w; c++) 545 for (; c != w; c++) 546 safe_chr(*c, buff, bp); 478 547 safe_chr(*c, buff, bp); 479 safe_chr(*c, buff, bp);548 } 480 549 } 481 550 c = w; 1.7.7/src/game.c
r451 r453 671 671 } 672 672 } 673 if ( !IsGarbage(thing) && !(Halted(thing)))673 if (STARTUPS && !IsGarbage(thing) && !(Halted(thing))) 674 674 (void) queue_attribute_noparent(thing, "STARTUP", thing); 675 675 } 1.7.7/src/mysocket.c
r449 r453 367 367 /* ARGSUSED */ 368 368 void 369 set_keepalive(int s )369 set_keepalive(int s __attribute__ ((__unused__))) 370 370 { 371 371 #ifdef CAN_KEEPALIVE 1.7.7/src/notify.c
r451 r453 980 980 } 981 981 982 /** Send a message to a series of dbrefs. 983 * This key function takes a speaker's utterance and looks up each 984 * object that should hear it. For each, it may need to render 985 * the utterance in a different fashion (with or without ansi, html, 986 * accents), but we cache each rendered version for efficiency. 987 * \param speaker dbref of object producing the message. 988 * \param func pointer to iterator function to look up each receiver. 989 * \param fdata initial data to pass to func. 990 * \param nsfunc function to call to do NOSPOOF formatting, or NULL. 991 * \param flags flags to pass in (such as NA_INTERACT) 992 * \param message message to render and transmit. 993 */ 994 void 995 notify_anything(dbref speaker, na_lookup func, 996 void *fdata, char *(*nsfunc) (dbref, na_lookup func, void *, 997 int), int flags, 998 const char *message) 999 { 1000 dbref loc; 1001 1002 if (GoodObject(speaker)) 1003 loc = Location(speaker); 1004 else 1005 loc = NOTHING; 1006 1007 notify_anything_loc(speaker, func, fdata, nsfunc, flags, message, loc); 1008 } 1009 982 1010 /** Send a message to a list of dbrefs on an attribute on an object. 983 1011 * Be sure we don't send a message to the object itself! 1.7.7/src/predicat.c
r451 r453 515 515 /* subtract cost from who's pennies */ 516 516 517 dbreftmp;517 int tmp; 518 518 if (NoPay(who)) 519 519 return 1; … … 736 736 ok_password(const char *password) 737 737 { 738 const char *scan;738 const unsigned char *scan; 739 739 if (*password == '\0') 740 740 return 0; 741 741 742 for (scan = password; *scan; scan++) {742 for (scan = (const unsigned char *) password; *scan; scan++) { 743 743 if (!(isprint(*scan) && !isspace(*scan))) { 744 744 return 0; … … 777 777 * Right now, this means: filter out SEND and XCH_CMD if 778 778 * the player isn't a Wizard. Params may contain a space-separated 779 * list of tag=value pairs. 779 * list of tag=value pairs. It's probably possible to fool this 780 * checking. Needs more work, or removing HTML support. 780 781 * \param player player using the attribute, or NOTHING for internal. 781 782 * \param params the attributes to use. … … 786 787 ok_tag_attribute(dbref player, const char *params) 787 788 { 788 const char *p, *q; 789 const unsigned char *p, *q; 790 789 791 if (!GoodObject(player) || Wizard(player)) 790 792 return 1; 791 p = params;793 p = (const unsigned char *) params; 792 794 while (*p) { 793 795 while (*p && isspace(*p)) 794 796 p++; 795 797 q = p; 796 while (*q && !(isspace(*q) || (*q == '=')))798 while (*q && *q != '=') 797 799 q++; 798 800 if (*q) { 799 *q++ = '\0'; 800 if (strcasecmp(p, "SEND") || strcasecmp(p, "XCH_CMD")) 801 size_t n = q - p; 802 /* Invalid params for non-wizards. Turn to a hashtable if we ever 803 get more? */ 804 if (strncasecmp(p, "SEND", n) == 0 || strncasecmp(p, "XCH_CMD", n) == 0) 801 805 return 0; 802 806 while (*q && isspace(*q)) … … 805 809 q++; 806 810 p = q; 807 } 811 } else 812 return 0; /* Malformed param without an = */ 813 808 814 } 809 815 return 1; 1.7.7/src/set.c
r451 r453 85 85 if (PLAYER_NAME_SPACES) { 86 86 if (*newname == '\"') { 87 for (; *newname && ((*newname == '\"') || isspace(*newname)); 87 for (; *newname && ((*newname == '\"') 88 || isspace((unsigned char) *newname)); 88 89 newname++) ; 89 90 password = newname;
