| 1114 | static const char stats_sep[] = "--------------------------- ----- -------"; |
| 1115 | |
| 1116 | staticfn int |
| 1117 | size_obj(struct obj *otmp) |
| 1118 | { |
| 1119 | int sz = (int) sizeof (struct obj); |
| 1120 | |
| 1121 | if (otmp->oextra) { |
| 1122 | sz += (int) sizeof (struct oextra); |
| 1123 | if (ONAME(otmp)) |
| 1124 | sz += (int) strlen(ONAME(otmp)) + 1; |
| 1125 | if (OMONST(otmp)) |
| 1126 | sz += size_monst(OMONST(otmp), FALSE); |
| 1127 | if (OMAILCMD(otmp)) |
| 1128 | sz += (int) strlen(OMAILCMD(otmp)) + 1; |
| 1129 | /* sz += (int) sizeof (unsigned); -- now part of oextra itself */ |
| 1130 | } |
| 1131 | return sz; |
| 1132 | } |
| 1133 | |
| 1134 | staticfn void |
| 1135 | count_obj(struct obj *chain, long *total_count, long *total_size, |
no test coverage detected