Changeset 449
- Timestamp:
- 08/16/06 00:34:23 (2 years ago)
- Files:
-
- 1.7.7/CHANGES.177 (modified) (1 diff)
- 1.7.7/Patchlevel (modified) (1 diff)
- 1.7.7/game/txt/hlp/penncmd.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/boolexp.h (modified) (1 diff)
- 1.7.7/hdrs/externs.h (modified) (1 diff)
- 1.7.7/hdrs/version.h (modified) (1 diff)
- 1.7.7/src/attrib.c (modified) (3 diffs)
- 1.7.7/src/boolexp.c (modified) (6 diffs)
- 1.7.7/src/bsd.c (modified) (3 diffs)
- 1.7.7/src/chunk.c (modified) (15 diffs)
- 1.7.7/src/command.c (modified) (1 diff)
- 1.7.7/src/comp_w.c (modified) (2 diffs)
- 1.7.7/src/comp_w8.c (modified) (2 diffs)
- 1.7.7/src/extchat.c (modified) (2 diffs)
- 1.7.7/src/extmail.c (modified) (3 diffs)
- 1.7.7/src/flags.c (modified) (5 diffs)
- 1.7.7/src/funlist.c (modified) (8 diffs)
- 1.7.7/src/game.c (modified) (2 diffs)
- 1.7.7/src/help.c (modified) (1 diff)
- 1.7.7/src/info_slave.c (modified) (1 diff)
- 1.7.7/src/lock.c (modified) (2 diffs)
- 1.7.7/src/look.c (modified) (4 diffs)
- 1.7.7/src/mysocket.c (modified) (2 diffs)
- 1.7.7/src/notify.c (modified) (1 diff)
- 1.7.7/src/services.c (modified) (1 diff)
- 1.7.7/src/speech.c (modified) (4 diffs)
- 1.7.7/src/strutil.c (modified) (2 diffs)
- 1.7.7/src/timer.c (modified) (1 diff)
- 1.7.7/src/unparse.c (modified) (1 diff)
- 1.7.7/src/wiz.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.7.7/CHANGES.177
r447 r449 18 18 19 19 ========================================================================== 20 21 Version 1.7.7 patchlevel 25 October 30, 2003 22 23 Fixes: 24 * Crash bug in the interaction between parents and attr trees 25 fixed. Report by Walker@M*U*S*H. 26 * Improvements to how locks are decompiled. Built-in locks with the 27 no_inherit flag cleared are handled better. If the object doing 28 the @decompile is referenced in a lock key, it's decompiled as 'me' 29 rather than by dbref, to make it easier to port between games. 30 Report by Cerekk@bDv. [SW] 31 * The error typically logged by info_slave on a mush crash is worded 32 better. [SW] 33 * panic() renamed mush_panic() as the Mach kernel now has a public 34 system call panic(). Report by Jeff Ferrell. 35 20 36 21 37 Version 1.7.7 patchlevel 24 October 19, 2003 1.7.7/Patchlevel
r447 r449 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.7.7p2 42 This is PennMUSH 1.7.7p25 1.7.7/game/txt/hlp/penncmd.hlp
r447 r449 321 321 322 322 Sets the actions to be taken after a player gives an object some 323 amount of pennies. 323 amount of pennies. The amount paid is passed in as %0. 324 324 325 325 See also: give, @pay, @opay, @cost, MONEY, ACTION LISTS 1.7.7/game/txt/hlp/pennv177.hlp
r447 r449 1 & 1.7.7p2 41 & 1.7.7p25 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 25 October 30, 2003 15 16 Fixes: 17 * Crash bug in the interaction between parents and attr trees 18 fixed. Report by Walker@M*U*S*H. 19 * Improvements to how locks are decompiled. Built-in locks with the 20 no_inherit flag cleared are handled better. If the object doing 21 the @decompile is referenced in a lock key, it's decompiled as 'me' 22 rather than by dbref, to make it easier to port between games. 23 Report by Cerekk@bDv. [SW] 24 * The error typically logged by info_slave on a mush crash is worded 25 better. [SW] 26 * panic() renamed mush_panic() as the Mach kernel now has a public 27 system call panic(). Report by Jeff Ferrell. 28 29 30 & 1.7.7p24 14 31 Version 1.7.7 patchlevel 24 October 19, 2003 15 32 1.7.7/game/txt/hlp/pennvOLD.hlp
r447 r449 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 4421 19, 20, 21, 22, 23, 24, 25 4422 4422 1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 4423 4423 1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.7/hdrs/boolexp.h
r433 r449 25 25 boolexp getboolexp(FILE * f, const char *ltype); 26 26 void putboolexp(FILE * f, boolexp b); 27 enum u_b_f { UB_ALL, UB_DBREF }; 27 enum u_b_f { 28 UB_ALL, /**< Use names of objects */ 29 UB_DBREF, /**< Use dbrefs */ 30 UB_MEREF /**< Use dbrefs or "me" if the object is the player arg 31 from unparse_boolexp.() For @decompile. */ 32 }; 28 33 extern char *unparse_boolexp(dbref player, boolexp b, enum u_b_f flag); 29 34 #endif /* BOOLEXP_H */ 1.7.7/hdrs/externs.h
r443 r449 64 64 extern void init_game_config(const char *conf); 65 65 extern void dump_database(void); 66 extern void NORETURN panic(const char *message);66 extern void NORETURN mush_panic(const char *message); 67 67 extern char *scan_list(dbref player, char *command); 68 68 1.7.7/hdrs/version.h
r447 r449 1 #define VERSION "PennMUSH version 1.7.7 patchlevel 2 4 [10/19/2003]"2 #define SHORTVN "PennMUSH 1.7.7p2 4"3 #define NUMVERSION 00100700702 41 #define VERSION "PennMUSH version 1.7.7 patchlevel 25 [10/30/2003]" 2 #define SHORTVN "PennMUSH 1.7.7p25" 3 #define NUMVERSION 001007007025 1.7.7/src/attrib.c
r447 r449 1381 1381 page = (ATTRPAGE *) mush_malloc(sizeof(ATTRPAGE), "ATTRPAGE"); 1382 1382 if (!page) 1383 panic("Couldn't allocate memory in get_atr_free_list");1383 mush_panic("Couldn't allocate memory in get_atr_free_list"); 1384 1384 for (j = 0; j < ATTRS_PER_PAGE - 1; j++) 1385 1385 AL_NEXT(page->atrs + j) = page->atrs + j + 1; … … 1456 1456 while (atr) { 1457 1457 comp = strcoll(name, AL_NAME(atr)); 1458 if (comp < 0) 1458 if (comp < 0) { 1459 *p = '`'; 1459 1460 goto continue_target; 1461 } 1460 1462 if (comp == 0) 1461 1463 break; 1462 1464 atr = AL_NEXT(atr); 1463 1465 } 1464 if (!atr || (target != obj && (AL_FLAGS(atr) & AF_PRIVATE))) 1466 if (!atr || (target != obj && (AL_FLAGS(atr) & AF_PRIVATE))) { 1467 *p = '`'; 1465 1468 goto continue_target; 1469 } 1466 1470 if ((AL_FLAGS(atr) & AF_INTERNAL) || (AL_FLAGS(atr) & AF_MDARK) || 1467 1471 !((AL_FLAGS(atr) & AF_VISUAL) || control || exam || … … 1483 1487 1484 1488 continue_target: 1485 *p = '`';1486 1489 1487 1490 /* Attribute wasn't on this object. Check a parent or ancestor. */ 1.7.7/src/boolexp.c
r433 r449 551 551 } 552 552 553 /** Pretty-print object references for unparse_boolexp(). 554 * \param player the object seeing the decompiled lock. 555 * \param thing the object referenced in the lock. 556 * \param flag How to print thing. 557 * \param buff The start of the output buffer. 558 * \param bp Pointer to the current position in buff. 559 * \return 0 on success, true on buffer overflow. 560 */ 561 static int 562 safe_boref(dbref player, dbref thing, enum u_b_f flag, char *buff, char **bp) 563 { 564 switch (flag) { 565 case UB_MEREF: 566 if (player == thing) 567 return safe_strl("me", 2, buff, bp); 568 else 569 return safe_dbref(thing, buff, bp); 570 case UB_DBREF: 571 return safe_dbref(thing, buff, bp); 572 case UB_ALL: 573 default: 574 return safe_str(unparse_object(player, thing), buff, bp); 575 } 576 } 577 553 578 /** Display a boolexp. 554 579 * This function returns the textual representation of the boolexp. … … 629 654 break; 630 655 case OP_TCONST: 631 if (flag == UB_DBREF) 632 safe_format(boolexp_buf, &buftop, "#%d", arg); 633 else 634 safe_str(unparse_object(player, arg), boolexp_buf, &buftop); 656 safe_boref(player, arg, flag, boolexp_buf, &buftop); 635 657 break; 636 658 case OP_TATR: … … 639 661 case OP_TIND: 640 662 safe_chr(AT_TOKEN, boolexp_buf, &buftop); 641 if (flag == UB_DBREF) 642 safe_format(boolexp_buf, &buftop, "#%d", arg); 643 else 644 safe_str(unparse_object(player, arg), boolexp_buf, &buftop); 663 safe_boref(player, arg, flag, boolexp_buf, &buftop); 645 664 safe_format(boolexp_buf, &buftop, "/%s", s); 646 665 break; 647 666 case OP_TCARRY: 648 667 safe_chr(IN_TOKEN, boolexp_buf, &buftop); 649 if (flag == UB_DBREF) 650 safe_format(boolexp_buf, &buftop, "#%d", arg); 651 else 652 safe_str(unparse_object(player, arg), boolexp_buf, &buftop); 668 safe_boref(player, arg, flag, boolexp_buf, &buftop); 653 669 break; 654 670 case OP_TIS: 655 671 safe_chr(IS_TOKEN, boolexp_buf, &buftop); 656 if (flag == UB_DBREF) 657 safe_format(boolexp_buf, &buftop, "#%d", arg); 658 else 659 safe_str(unparse_object(player, arg), boolexp_buf, &buftop); 672 safe_boref(player, arg, flag, boolexp_buf, &buftop); 660 673 break; 661 674 case OP_TOWNER: 662 675 safe_chr(OWNER_TOKEN, boolexp_buf, &buftop); 663 if (flag == UB_DBREF) 664 safe_format(boolexp_buf, &buftop, "#%d", arg); 665 else 666 safe_str(unparse_object(player, arg), boolexp_buf, &buftop); 676 safe_boref(player, arg, flag, boolexp_buf, &buftop); 667 677 break; 668 678 case OP_TEVAL: … … 1190 1200 newstr = mush_malloc(sizeof *newstr, "bvm.strnode"); 1191 1201 if (!s) 1192 panic(T("Unable to allocate memory for boolexp string node!"));1202 mush_panic(T("Unable to allocate memory for boolexp string node!")); 1193 1203 newstr->s = mush_strdup(s, "bvm.string"); 1194 1204 if (!newstr->s) 1195 panic(T("Unable to allocate memory for boolexp string!"));1205 mush_panic(T("Unable to allocate memory for boolexp string!")); 1196 1206 newstr->len = strlen(s) + 1; 1197 1207 newstr->next = NULL; … … 1209 1219 newop = mush_malloc(sizeof *newop, "bvm.asmnode"); 1210 1220 if (!newop) 1211 panic(T("Unable to allocate memory for boolexp asm node!"));1221 mush_panic(T("Unable to allocate memory for boolexp asm node!")); 1212 1222 newop->op = op; 1213 1223 newop->arg = arg; … … 1440 1450 newlbl = mush_malloc(sizeof *newlbl, "bvm.asmnode"); 1441 1451 if (!newlbl) 1442 panic(T("Unable to allocate memory for boolexp asm node!"));1452 mush_panic(T("Unable to allocate memory for boolexp asm node!")); 1443 1453 newlbl->op = OP_LABEL; 1444 1454 n->arg = newlbl->arg = gen_label_id(a); 1.7.7/src/bsd.c
r445 r449 1676 1676 d = (DESC *) mush_malloc(sizeof(DESC), "descriptor"); 1677 1677 if (!d) 1678 panic("Out of memory.");1678 mush_panic("Out of memory."); 1679 1679 d->descriptor = s; 1680 1680 d->connected = 0; … … 2496 2496 "descriptor_raw_input"); 2497 2497 if (!d->raw_input) 2498 panic("Out of memory");2498 mush_panic("Out of memory"); 2499 2499 d->raw_input_at = d->raw_input; 2500 2500 } … … 3311 3311 char tbuf1[BUFFER_LEN]; 3312 3312 sprintf(tbuf1, T("BAILOUT: caught signal %d"), sig); 3313 panic(tbuf1);3313 mush_panic(tbuf1); 3314 3314 _exit(7); 3315 3315 } 1.7.7/src/chunk.c
r445 r449 678 678 if (pos == offset) { 679 679 if ((ChunkPointer(region, pos)[0] & CHUNK_FREE_MASK) == CHUNK_FREE) 680 panic("Invalid reference to used chunk");680 mush_panic("Invalid reference to used chunk"); 681 681 return; 682 682 } … … 1144 1144 if (j >= 3) 1145 1145 #ifdef WIN32 1146 panic(tprintf("chunk swap file seek, GetLastError %d", GetLastError())); 1146 mush_panic(tprintf 1147 ("chunk swap file seek, GetLastError %d", GetLastError())); 1147 1148 #else 1148 panic(tprintf("chunk swap file seek, errno %d: %s",1149 errno, strerror(errno)));1149 mush_panic(tprintf("chunk swap file seek, errno %d: %s", 1150 errno, strerror(errno))); 1150 1151 #endif 1151 1152 pos = (char *) rhp; … … 1171 1172 } 1172 1173 #ifdef WIN32 1173 panic(tprintf("chunk swap file read, %d remaining, GetLastError %d",1174 remaining, GetLastError()));1174 mush_panic(tprintf("chunk swap file read, %d remaining, GetLastError %d", 1175 remaining, GetLastError())); 1175 1176 #else 1176 panic(tprintf("chunk swap file read, %d remaining, errno %d: %s",1177 remaining, errno, strerror(errno)));1177 mush_panic(tprintf("chunk swap file read, %d remaining, errno %d: %s", 1178 remaining, errno, strerror(errno))); 1178 1179 #endif 1179 1180 } … … 1204 1205 if (j >= 3) 1205 1206 #ifdef WIN32 1206 panic(tprintf("chunk swap file seek, GetLastError %d", GetLastError())); 1207 mush_panic(tprintf 1208 ("chunk swap file seek, GetLastError %d", GetLastError())); 1207 1209 #else 1208 panic(tprintf("chunk swap file seek, errno %d: %s",1209 errno, strerror(errno)));1210 mush_panic(tprintf("chunk swap file seek, errno %d: %s", 1211 errno, strerror(errno))); 1210 1212 #endif 1211 1213 pos = (char *) rhp; … … 1231 1233 } 1232 1234 #ifdef WIN32 1233 panic(tprintf("chunk swap file write, %d remaining, GetLastError %d",1234 remaining, GetLastError()));1235 mush_panic(tprintf("chunk swap file write, %d remaining, GetLastError %d", 1236 remaining, GetLastError())); 1235 1237 #else 1236 panic(tprintf("chunk swap file write, %d remaining, errno %d: %s",1237 remaining, errno, strerror(errno)));1238 mush_panic(tprintf("chunk swap file write, %d remaining, errno %d: %s", 1239 remaining, errno, strerror(errno))); 1238 1240 #endif 1239 1241 } … … 1256 1258 rhp = mush_malloc(REGION_SIZE, "chunk region cache buffer"); 1257 1259 if (!rhp) { 1258 panic("chunk region cache buffer allocation failure");1260 mush_panic("chunk region cache buffer allocation failure"); 1259 1261 } 1260 1262 cached_region_count++; … … 1395 1397 regions = (Region *) realloc(regions, region_array_len * sizeof(Region)); 1396 1398 if (!regions) 1397 panic("chunk: region array realloc failure");1399 mush_panic("chunk: region array realloc failure"); 1398 1400 } 1399 1401 region = region_count; … … 1641 1643 #ifdef CHUNK_PARANOID 1642 1644 if (!region_is_valid(region)) 1643 panic("Invalid region in migrate_scan_region!");1645 mush_panic("Invalid region in migrate_scan_region!"); 1644 1646 #endif 1645 1647 … … 1666 1668 if (pos != offset || 1667 1669 (ChunkPointer(region, pos)[0] & CHUNK_FREE_MASK) == CHUNK_FREE) 1668 panic("Invalid reference to used chunk in migrate");1670 mush_panic("Invalid reference to used chunk in migrate"); 1669 1671 k++; 1670 1672 } … … 1751 1753 m_derefs = mush_malloc(count * sizeof(*m_derefs), "migrate derefs"); 1752 1754 if (!m_length || !m_unhappiness || !m_derefs) 1753 panic("Cannot allocate working space for migration");1755 mush_panic("Cannot allocate working space for migration"); 1754 1756 m_alloc = count; 1755 1757 } … … 2364 2366 2365 2367 if (len < MIN_CHUNK_LEN || len > MAX_CHUNK_LEN) 2366 panic(tprintf("Illegal chunk length requested: %d bytes", len));2368 mush_panic(tprintf("Illegal chunk length requested: %d bytes", len)); 2367 2369 2368 2370 full_len = LenToFullLen(len); … … 2383 2385 #ifdef CHUNK_PARANOID 2384 2386 if (!region_is_valid(region)) 2385 panic("Invalid region after chunk_create!");2387 mush_panic("Invalid region after chunk_create!"); 2386 2388 #endif 2387 2389 stat_create++; … … 2407 2409 #ifdef CHUNK_PARANOID 2408 2410 if (!region_is_valid(region)) 2409 panic("Invalid region after chunk_delete!");2411 mush_panic("Invalid region after chunk_delete!"); 2410 2412 #endif 2411 2413 stat_delete++; … … 2594 2596 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); 2595 2597 if (swap_fd == INVALID_HANDLE_VALUE) 2596 panic(tprintf("Cannot open swap file: %d", GetLastError()));2598 mush_panic(tprintf("Cannot open swap file: %d", GetLastError())); 2597 2599 #else 2598 2600 swap_fd = open(CHUNK_SWAP_FILE, O_RDWR | O_TRUNC | O_CREAT, 0600); 2599 2601 if (swap_fd < 0) 2600 panic(tprintf("Cannot open swap file: %s", strerror(errno)));2602 mush_panic(tprintf("Cannot open swap file: %s", strerror(errno))); 2601 2603 #endif 2602 2604 curr_period = 0; … … 2613 2615 regions = mush_malloc(region_array_len * sizeof(Region), "chunk region list"); 2614 2616 if (!regions) 2615 panic("cannot malloc space for chunk region list");2617 mush_panic("cannot malloc space for chunk region list"); 2616 2618 2617 2619 /* 1.7.7/src/command.c
r447 r449 836 836 switches = (char *) mush_malloc(BUFFER_LEN, "string"); 837 837 if (!command || !swtch || !ls || !rs || !switches) 838 panic("Couldn't allocate memory in command_parse");838 mush_panic("Couldn't allocate memory in command_parse"); 839 839 p = string; 840 840 replacer = NULL; 1.7.7/src/comp_w.c
r427 r449 211 211 212 212 if (!words[i]) 213 panic("Out of memory in string compression routine");213 mush_panic("Out of memory in string compression routine"); 214 214 215 215 #ifdef COMP_STATS … … 317 317 panicking = 1; /* don't panic from within panic */ 318 318 do_rawlog(LT_ERR, "Error in string decompression, i = %i", i); 319 panic("Fatal error in decompression");319 mush_panic("Fatal error in decompression"); 320 320 } 321 321 } 1.7.7/src/comp_w8.c
r427 r449 214 214 215 215 if (!words[i]) 216 panic("Out of memory in string compression routine");216 mush_panic("Out of memory in string compression routine"); 217 217 218 218 #ifdef COMP_STATS … … 323 323 panicking = 1; /* don't panic from within panic */ 324 324 fprintf(stderr, "Error in string decompression, i = %i\n", i); 325 panic("Fatal error in decompression");325 mush_panic("Fatal error in decompression"); 326 326 } 327 327 } 1.7.7/src/extchat.c
r445 r449 251 251 u = (CHANUSER *) mush_malloc(sizeof(CHANUSER), "CHANUSER"); 252 252 if (!u) 253 panic("Couldn't allocate memory in new_user in extchat.c");253 mush_panic("Couldn't allocate memory in new_user in extchat.c"); 254 254 CUdbref(u) = who; 255 255 CUtype(u) = CU_DEFAULT_FLAGS; … … 2276 2276 if (ChanModLock(c) != TRUE_BOOLEXP) 2277 2277 notify_format(player, "@clock/mod %s = %s", ChanName(c), 2278 unparse_boolexp(player, ChanModLock(c), UB_ DBREF));2278 unparse_boolexp(player, ChanModLock(c), UB_MEREF)); 2279 2279 if (ChanHideLock(c) != TRUE_BOOLEXP) 2280 2280 notify_format(player, "@clock/hide %s = %s", ChanName(c), 2281 unparse_boolexp(player, ChanHideLock(c), UB_ DBREF));2281 unparse_boolexp(player, ChanHideLock(c), UB_MEREF)); 2282 2282 if (ChanJoinLock(c) != TRUE_BOOLEXP) 2283 2283 notify_format(player, "@clock/join %s = %s", ChanName(c), 2284 unparse_boolexp(player, ChanJoinLock(c), UB_ DBREF));2284 unparse_boolexp(player, ChanJoinLock(c), UB_MEREF)); 2285 2285 if (ChanSpeakLock(c) != TRUE_BOOLEXP) 2286 2286 notify_format(player, "@clock/speak %s = %s", ChanName(c), 2287 unparse_boolexp(player, ChanSpeakLock(c), UB_ DBREF));2287 unparse_boolexp(player, ChanSpeakLock(c), UB_MEREF)); 2288 2288 if (ChanSeeLock(c) != TRUE_BOOLEXP) 2289 2289 notify_format(player, "@clock/see %s = %s", ChanName(c), 2290 unparse_boolexp(player, ChanSeeLock(c), UB_ DBREF));2290 unparse_boolexp(player, ChanSeeLock(c), UB_MEREF)); 2291 2291 if (ChanTitle(c)) 2292 2292 notify_format(player, "@channel/desc %s = %s", ChanName(c), 1.7.7/src/extmail.c
r433 r449 1026 1026 newmsg = (char *) mush_malloc(BUFFER_LEN, "string"); 1027 1027 if (!newmsg) 1028 panic(T("Failed to allocate string in send_mail"));1028 mush_panic(T("Failed to allocate string in send_mail")); 1029 1029 nm = newmsg; 1030 1030 safe_str(message, newmsg, &nm); … … 1033 1033 buff = (char *) mush_malloc(BUFFER_LEN, "string"); 1034 1034 if (!buff) 1035 panic(T("Failed to allocate string in send_mail"));1035 mush_panic(T("Failed to allocate string in send_mail")); 1036 1036 ms = mailsig = safe_atr_value(a); 1037 1037 bp = buff; … … 2198 2198 tbuf = (char *) mush_malloc(BUFFER_LEN, "string"); 2199 2199 if (!new || !pat || !str || !tbuf) 2200 panic(T("Failed to allocate strings in add_folder_name"));2200 mush_panic(T("Failed to allocate strings in add_folder_name")); 2201 2201 2202 2202 if (name && *name) 1.7.7/src/flags.c
r447 r449 69 69 extern PTAB ptab_command; /* Uses flag bitmasks */ 70 70 71 #define Flagspace_Lookup(n,ns) if (!(n = (FLAGSPACE *)hashfind(ns,&htab_flagspaces))) panic("Unable to locate flagspace");71 #define Flagspace_Lookup(n,ns) if (!(n = (FLAGSPACE *)hashfind(ns,&htab_flagspaces))) mush_panic("Unable to locate flagspace"); 72 72 73 73 /** This is the old default flag table. We still use it when we have to … … 343 343 FLAG *f = (FLAG *) mush_malloc(sizeof(FLAG), "flag"); 344 344 if (!f) 345 panic("Unable to allocate memory for a new flag!\n");345 mush_panic("Unable to allocate memory for a new flag!\n"); 346 346 return f; 347 347 } … … 411 411 (FLAG **) realloc(n->flags, (f->bitpos + 1) * sizeof(FLAG *)); 412 412 if (!n->flags) 413 panic("Unable to reallocate flags array!\n");413 mush_panic("Unable to reallocate flags array!\n"); 414 414 } 415 415 /* Make sure the new space is full of NULLs */ … … 797 797 bitmask = (object_flag_type) mush_malloc(FlagBytes(n), "flag_bitmask"); 798 798 if (!bitmask) 799 panic("Unable to allocate memory for flag bitmask");799 mush_panic("Unable to allocate memory for flag bitmask"); 800 800 memset(bitmask, 0, FlagBytes(n)); 801 801 return bitmask; … … 817 817 bitmask = (object_flag_type) mush_malloc(FlagBytes(n), "flag_bitmask"); 818 818 if (!bitmask) 819 panic("Unable to allocate memory for flag bitmask");819 mush_panic("Unable to allocate memory for flag bitmask"); 820 820 memcpy(bitmask, given, FlagBytes(n)); 821 821 return bitmask; 1.7.7/src/funlist.c
r441 r449 173 173 ptrs2 = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); 174 174 if (!ptrs1 || !ptrs2) 175 panic("Unable to allocate memory in fun_munge");175 mush_panic("Unable to allocate memory in fun_munge"); 176 176 nptrs1 = list2arr(ptrs1, MAX_SORTSIZE, args[1], sep); 177 177 nptrs2 = list2arr(ptrs2, MAX_SORTSIZE, args[2], sep); … … 200 200 results = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); 201 201 if (!results) 202 panic("Unable to allocate memory in fun_munge");202 mush_panic("Unable to allocate memory in fun_munge"); 203 203 nresults = list2arr(results, MAX_SORTSIZE, rlist, sep); 204 204 … … 249 249 wordlist = (char *) mush_malloc(BUFFER_LEN, "string"); 250 250 if (!ptrs || !wordlist) 251 panic("Unable to allocate memory in fun_elements");251 mush_panic("Unable to allocate memory in fun_elements"); 252 252 253 253 /* Turn the first list into an array. */ … … 382 382 rsave = (char *) mush_malloc(BUFFER_LEN, "string"); 383 383 if (!result || !rsave) 384 panic("Unable to allocate memory in fun_fold");384 mush_panic("Unable to allocate memory in fun_fold"); 385 385 386 386 abuf = safe_atr_value(attrib); … … 1091 1091 a2 = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); 1092 1092 if (!tempbuff || !a1 || !a2) 1093 panic("Unable to allocate memory in fun_setunion");1093 mush_panic("Unable to allocate memory in fun_setunion"); 1094 1094 /* Concat both lists, make array, sort */ 1095 1095 if (!*args[0]) … … 1156 1156 a2 = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); 1157 1157 if (!a1 || !a2) 1158 panic("Unable to allocate memory in fun_setunion");1158 mush_panic("Unable to allocate memory in fun_setunion"); 1159 1159 1160 1160 /* make arrays out of the lists */ … … 1271 1271 a2 = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); 1272 1272 if (!a1 || !a2) 1273 panic("Unable to allocate memory in fun_setunion");1273 mush_panic("Unable to allocate memory in fun_setunion"); 1274 1274 1275 1275 /* make arrays out of the lists */ … … 2149 2149 list = (char *) mush_malloc(BUFFER_LEN, "string"); 2150 2150 if (!outsep || !list) 2151 panic("Unable to allocate memory in fun_iter");2151 mush_panic("Unable to allocate memory in fun_iter"); 2152 2152 if (nargs < 4) 2153 2153 strcpy(outsep, " "); 1.7.7/src/game.c
r445 r449 311 311 312 312 if (flag == SHUT_PANIC) { 313 panic("@shutdown/panic");313 mush_panic("@shutdown/panic"); 314 314 } else { 315 315 if (flag == SHUT_PARANOID) { … … 457 457 */ 458 458 void 459 panic(const char *message)459 mush_panic(const char *message) 460 460 { 461 461 const char *panicfile = options.crash_db; 1.7.7/src/help.c
r441 r449 319 319 topics = (help_indx *) malloc(top_topics * sizeof(help_indx)); 320 320 if (!topics) { 321 panic(T("Out of memory"));321 mush_panic(T("Out of memory")); 322 322 } 323 323 } 1.7.7/src/info_slave.c
r433 r449 149 149 len = read(mush, &rlen, sizeof rlen); 150 150 if (len < (int) sizeof rlen) { 151 perror("info_slave reading remote size ");151 perror("info_slave reading remote size (Did the mush crash?)"); 152 152 return EXIT_FAILURE; 153 153 } 1.7.7/src/lock.c
r441 r449 223 223 224 224 if (!ll) 225 panic("Unable to allocate memory for locks!");225 mush_panic("Unable to allocate memory for locks!"); 226 226 227 227 for (n = 0; n < LOCKS_PER_PAGE - 1; n++) { … … 360 360 361 361 for (ll = lock_types; ll->type; ll++) 362 if (strc mp(type, ll->type) == 0)362 if (strcasecmp(type, ll->type) == 0) 363 363 return ll; 364 364 1.7.7/src/look.c
r443 r449 75 75 nbuf = (char *) mush_malloc(BUFFER_LEN, "string"); 76 76 if (!tbuf1 || !tbuf2 || !nbuf) 77 panic("Unable to allocate memory in look_exits");77 mush_panic("Unable to allocate memory in look_exits"); 78 78 s1 = tbuf1; 79 79 s2 = tbuf2; … … 91 91 buff = (char *) mush_malloc(BUFFER_LEN, "string"); 92 92 if (!arg || !buff) 93 panic("Unable to allocate memory in look_exits");93 mush_panic("Unable to allocate memory in look_exits"); 94 94 save_global_regs("look_exits", rsave); 95 95 for (j = 0; j < 10; j++) { … … 242 242 buff = (char *) mush_malloc(BUFFER_LEN, "string"); 243 243 if (!arg || !buff) 244 panic("Unable to allocate memory in look_contents");244 mush_panic("Unable to allocate memory in look_contents"); 245 245 save_global_regs("look_contents", rsave); 246 246 for (j = 0; j < 10; j++) { … … 1347 1347 lock_list *ll; 1348 1348 for (ll = Locks(thing); ll; ll = ll->next) { 1349 if (match_lock(ll->type) != NULL) { 1349 const lock_list *p = get_lockproto(L_TYPE(ll)); 1350 if (p) { 1350 1351 notify_format(player, "@lock/%s %s=%s", 1351 1352 L_TYPE(ll), name, unparse_boolexp(player, L_KEY(ll), 1352 UB_DBREF)); 1353 if (L_FLAGS(ll)) { 1354 if (skipdef) { 1355 const lock_list *p = get_lockproto(L_TYPE(ll)); 1356 if (p && L_FLAGS(ll) == L_FLAGS(p)) 1357 continue; 1358 } 1359 notify_format(player, 1360 "@lset %s/%s=%s", name, L_TYPE(ll), lock_flags_long(ll)); 1361 } 1362 } else { 1363 notify_format(player, "@lock/user:%s %s=%s", 1364 ll->type, name, unparse_boolexp(player, ll->key, UB_DBREF)); 1353 UB_MEREF)); 1354 if (skipdef) { 1355 if (p && L_FLAGS(ll) == L_FLAGS(p)) 1356 continue; 1357 } 1365 1358 if (L_FLAGS(ll)) 1366 1359 notify_format(player, 1367 1360 "@lset %s/%s=%s", name, L_TYPE(ll), lock_flags_long(ll)); 1368 1361 if ((L_FLAGS(p) & LF_PRIVATE) && !(L_FLAGS(ll) & LF_PRIVATE)) 1362 notify_format(player, "@lset %s/%s=!no_inherit", name, L_TYPE(ll)); 1363 } else { 1364 notify_format(player, "@lock/user:%s %s=%s", 1365 ll->type, name, unparse_boolexp(player, ll->key, UB_MEREF)); 1366 if (L_FLAGS(ll)) 1367 notify_format(player, 1368 "@lset %s/%s=%s", name, L_TYPE(ll), lock_flags_long(ll)); 1369 1369 } 1370 1370 } 1.7.7/src/mysocket.c
r445 r449 344 344 perror("make_nonblocking: fcntl"); 345 345 #ifndef INFOSLAVE 346 panic("F_GETFL fcntl failed");346 mush_panic("F_GETFL fcntl failed"); 347 347 #else 348 348 exit(1); … … 354 354 perror("make_nonblocking: fcntl"); 355 355 #ifndef INFOSLAVE 356 panic("O_NDELAY fcntl failed");356 mush_panic("O_NDELAY fcntl failed"); 357 357 #else 358 358 exit(1); 1.7.7/src/notify.c
r447 r449 1186 1186 (struct text_block *) mush_malloc(sizeof(struct text_block), "text_block"); 1187 1187 if (!p) 1188 panic("Out of memory");1188 mush_panic("Out of memory"); 1189 1189 p->buf = 1190 1190 (unsigned char *) mush_malloc(sizeof(unsigned char) * n, "text_block_buff"); 1191 1191 if (!p->buf) 1192 panic("Out of memory");1192 mush_panic("Out of memory"); 1193 1193 1194 1194 memcpy(p->buf, s, n); 1.7.7/src/services.c
r399 r449 362 362 threadHandle = NULL; 363 363 364 panic(T("System shutdown by system operator"));364 mush_panic(T("System shutdown by system operator")); 365 365 366 366 _exit(99); 1.7.7/src/speech.c
r439 r449 361 361 tp = tbuf = (char *) mush_malloc(BUFFER_LEN, "string"); 362 362 if (!tbuf) 363 panic("Unable to allocate memory in do_whisper_list");363 mush_panic("Unable to allocate memory in do_whisper_list"); 364 364 365 365 overheard = 0; … … 722 722 tp2 = tbuf2 = (char *) mush_malloc(BUFFER_LEN, "string"); 723 723 if (!tbuf2) 724 panic("Unable to allocate memory in do_page");724 mush_panic("Unable to allocate memory in do_page"); 725 725 726 726 if (arg2 && *arg2 && *arg1) { … … 758 758 tp = tbuf = (char *) mush_malloc(BUFFER_LEN, "string"); 759 759 if (!tbuf) 760 panic("Unable to allocate memory in do_page");760 mush_panic("Unable to allocate memory in do_page"); 761 761 762 762 if (override && !Pemit_All(player)) { … … 864 864 mb = msgbuf = (char *) mush_malloc(BUFFER_LEN, "string"); 865 865 if (!msgbuf) 866 panic("Unable to allocate memory in do_page");866 mush_panic("Unable to allocate memory in do_page"); 867 867 868 868 process_expression(msgbuf, &mb, &message, player, cause, cause, 1.7.7/src/strutil.c
r445 r449 868 868 r = result = mush_malloc(BUFFER_LEN, "replace_string.buff"); 869 869 if (!result) 870 panic(T("Couldn't allocate memory in replace_string!"));870 mush_panic(T("Couldn't allocate memory in replace_string!")); 871 871 872 872 len = strlen(old); … … 915 915 rp = result = mush_malloc(BUFFER_LEN, "replace_string.buff"); 916 916 if (!result) 917 panic(T("Couldn't allocate memory in replace_string2!"));917 mush_panic(T("Couldn't allocate memory in replace_string2!")); 918 918 919 919 firsts[0] = old[0][0]; 1.7.7/src/timer.c
r439 r449 161 161 refs_size = actual; 162 162 if (!refs) 163 panic("Could not allocate migration reference array");163 mush_panic("Could not allocate migration reference array"); 164 164 } 165 165 #ifdef DEBUG_MIGRATE 1.7.7/src/unparse.c
r427 r449 200 200 arg = (char *) mush_malloc(BUFFER_LEN, "string"); 201 201 if (!arg) 202 panic("Unable to allocate memory in nameformat");202 mush_panic("Unable to allocate memory in nameformat"); 203 203 save_global_regs("nameformat", rsave); 204 204 for (j = 0; j < 10; j++) { 1.7.7/src/wiz.c
r447 r449 1494 1494 (dbref *) mush_malloc(sizeof(dbref) * result_size, "search_results"); 1495 1495 if (!*result) 1496 panic(T("Couldn't allocate memory in search!"));1496 mush_panic(T("Couldn't allocate memory in search!")); 1497 1497 1498 1498 switch (sclass) { … … 1508 1508 sizeof(dbref) * result_size); 1509 1509 if (!newresults) 1510 panic(T("Couldn't reallocate memory in search!"));1510 mush_panic(T("Couldn't reallocate memory in search!")); 1511 1511 *result = newresults; 1512 1512 } … … 1525 1525 (dbref *) realloc((Malloc_t) *result, sizeof(dbref) * result_size); 1526 1526 if (!newresults) 1527 panic(T("Couldn't reallocate memory in search!"));1527 mush_panic(T("Couldn't reallocate memory in search!")); 1528 1528 *result = newresults; 1529 1529 } … … 1543 1543 (dbref *) realloc((Malloc_t) *result, sizeof(dbref) * result_size); 1544 1544 if (!newresults) 1545 panic(T("Couldn't reallocate memory in search!"));1545 mush_panic(T("Couldn't reallocate memory in search!")); 1546 1546 *result = newresults; 1547 1547 } … … 1562 1562 (dbref *) realloc((Malloc_t) *result, sizeof(dbref) * result_size); 1563
