more fmt_ptr (trunk only)
This commit is contained in:
+13
-6
@@ -479,17 +479,22 @@ compare_blstats(bl1, bl2)
|
|||||||
struct istat_s *bl1, *bl2;
|
struct istat_s *bl1, *bl2;
|
||||||
{
|
{
|
||||||
int anytype, result = 0;
|
int anytype, result = 0;
|
||||||
|
char bl1_address[FMT_PTR_BUFSIZ], bl2_address[FMT_PTR_BUFSIZ];
|
||||||
|
|
||||||
if (!bl1 || !bl2) {
|
if (!bl1 || !bl2) {
|
||||||
panic("compare_blstat: bad istat pointer %ld, %ld",
|
char bl1_address[FMT_PTR_BUFSIZ], bl2_address[FMT_PTR_BUFSIZ];
|
||||||
(long)bl1, (long)bl2);
|
panic("compare_blstat: bad istat pointer %s, %s",
|
||||||
|
fmt_ptr((genericptr_t)bl1, bl1_address),
|
||||||
|
fmt_ptr((genericptr_t)bl2, bl2_address));
|
||||||
}
|
}
|
||||||
|
|
||||||
anytype = bl1->anytype;
|
anytype = bl1->anytype;
|
||||||
if ((!bl1->a.a_void || !bl2->a.a_void) &&
|
if ((!bl1->a.a_void || !bl2->a.a_void) &&
|
||||||
(anytype == ANY_IPTR || anytype == ANY_UPTR ||
|
(anytype == ANY_IPTR || anytype == ANY_UPTR ||
|
||||||
anytype == ANY_LPTR || anytype == ANY_ULPTR)) {
|
anytype == ANY_LPTR || anytype == ANY_ULPTR)) {
|
||||||
panic("compare_blstat: invalid pointer %ld, %ld",
|
panic("compare_blstat: invalid pointer %s, %s",
|
||||||
(long)bl1->a.a_void, (long)bl2->a.a_void);
|
fmt_ptr((genericptr_t)bl1->a.a_void, bl1_address),
|
||||||
|
fmt_ptr((genericptr_t)bl2->a.a_void, bl2_address));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(anytype) {
|
switch(anytype) {
|
||||||
@@ -554,8 +559,10 @@ struct istat_s *bl, *maxbl;
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
int anytype;
|
int anytype;
|
||||||
if (!bl || !maxbl) {
|
if (!bl || !maxbl) {
|
||||||
impossible("percentage: bad istat pointer %ld, %ld",
|
char bl_address[FMT_PTR_BUFSIZ], maxbl_address[FMT_PTR_BUFSIZ];
|
||||||
(long)bl, (long)maxbl);
|
impossible("percentage: bad istat pointer %s, %s",
|
||||||
|
fmt_ptr((genericptr_t)bl, bl_address),
|
||||||
|
fmt_ptr((genericptr_t)maxbl, maxbl_address));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -91,6 +91,7 @@ del_light_source(type, id)
|
|||||||
{
|
{
|
||||||
light_source *curr, *prev;
|
light_source *curr, *prev;
|
||||||
genericptr_t tmp_id;
|
genericptr_t tmp_id;
|
||||||
|
char id_address[FMT_PTR_BUFSIZ];
|
||||||
|
|
||||||
/* need to be prepared for dealing a with light source which
|
/* need to be prepared for dealing a with light source which
|
||||||
has only been partially restored during a level change
|
has only been partially restored during a level change
|
||||||
@@ -117,7 +118,8 @@ del_light_source(type, id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impossible("del_light_source: not found type=%d, id=0x%lx", type, (long)id);
|
impossible("del_light_source: not found type=%d, id=%s",
|
||||||
|
type, fmt_ptr((genericptr_t)id, id_address));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark locations that are temporarily lit via mobile light sources. */
|
/* Mark locations that are temporarily lit via mobile light sources. */
|
||||||
|
|||||||
Reference in New Issue
Block a user