strcpy(d->doing, buf);
if (strlen(message) >= DOING_LEN) {
notify_format(player,
- T("Doing set. %d characters lost."),
+ T("Doing set. %zu characters lost."),
strlen(message) - (DOING_LEN - 1));
} else
notify(player, T("Doing set."));
if (strlen(message) >= DOING_LEN) {
poll_msg[DOING_LEN - 1] = 0;
notify_format(player,
- T("Poll set. %d characters lost."),
+ T("Poll set. %zu characters lost."),
strlen(message) - (DOING_LEN - 1));
} else
notify(player, T("Poll set."));
mush_panicf("chunk swap file read, %d remaining, GetLastError %d",
remaining, GetLastError());
#else
- mush_panicf("chunk swap file read, %d remaining, errno %d: %s",
+ mush_panicf("chunk swap file read, %zu remaining, errno %d: %s",
remaining, errno, strerror(errno));
#endif
}
mush_panicf("chunk swap file write, %d remaining, GetLastError %d",
remaining, GetLastError());
#else
- mush_panicf("chunk swap file write, %d remaining, errno %d: %s",
+ mush_panicf("chunk swap file write, %zu remaining, errno %d: %s",
remaining, errno, strerror(errno));
#endif
}
strcpy(d->doing, buf);
if (strlen(message) >= DOING_LEN) {
notify_format(player,
- T("Doing set. %d characters lost."),
+ T("Doing set. %zu characters lost."),
strlen(message) - (DOING_LEN - 1));
} else
notify(player, T("Doing set."));
if (strlen(message) >= DOING_LEN) {
poll_msg[DOING_LEN - 1] = 0;
notify_format(player,
- T("Poll set. %d characters lost."),
+ T("Poll set. %zu characters lost."),
strlen(message) - (DOING_LEN - 1));
} else
notify(player, T("Poll set."));
if (!Chan_Can_See(p, player))
continue;
if ((type == PMATCH_ALL) || ((type == PMATCH_ON)
- ? (int) (void *) OnChannel(player, p)
+ ? (long) OnChannel(player, p)
: !OnChannel(player, p))) {
strcpy(cleanp, remove_markup(ChanName(p), NULL));
if (string_prefix(cleanp, cleanname)) {
void
add_player(dbref player, const char *alias)
{
+ long tmp;
+ tmp = player;
if (!hft_initialized)
init_hft();
if (alias)
- hashadd(strupper(alias), (void *) player, &htab_player_list);
+ hashadd(strupper(alias), (void *) tmp, &htab_player_list);
else
- hashadd(strupper(Name(player)), (void *) player, &htab_player_list);
+ hashadd(strupper(Name(player)), (void *) tmp, &htab_player_list);
}
/** Look up a player in the player list htab (or by dbref).
{
int p;
void *hval;
+ long tmp;
if (!name || !*name)
return NOTHING;
hval = hashfind(strupper(name), &htab_player_list);
if (!hval)
return NOTHING;
- return (dbref) hval;
+ tmp = (long) hval;
+ return (dbref) tmp;
/* By the way, there's a flaw in this code. If #0 was a player, we'd
* hash its name with a dbref of (void *)0, aka NULL, so we'd never
* be able to retrieve that player. However, we assume that #0 will
bytes = (sizeof(StrNode) - BUFFER_LEN) * root->count + root->mem;
st_traverse_stats(root->root, &maxdepth, &mindepth, &avgdepth, &leaves,
&perms, &nperms);
- notify_format(player, "%-10s %7d %7d %6d %4d %4d %9lu %11.3f %7lu",
+ notify_format(player, "%-10s %7ld %7d %6d %4d %4d %9lu %11.3f %7lu",
name, root->count, leaves, mindepth, maxdepth,
avgdepth, perms,
((double) nperms / (double) (root->count - perms)), bytes);
add_check(check);
ptr = malloc(size);
if (ptr == NULL)
- do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %d bytes for %s",
+ do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %ld bytes for %s",
size, check);
return ptr;
}