static char *status_string(MAIL *mp);
static int sign(int x);
static char *get_message(MAIL *mp);
-static char *get_compressed_message(MAIL *mp);
+static unsigned char *get_compressed_message(MAIL *mp);
static char *get_subject(MAIL *mp);
static char *get_sender(MAIL *mp, int full);
static int was_sender(dbref player, MAIL *mp);
}
/* Return the compressed text of a @mail in a static buffer */
-static char *
+static unsigned char *
get_compressed_message(MAIL *mp)
{
- unsigned static char text[BUFFER_LEN * 2];
+ static unsigned char text[BUFFER_LEN * 2];
if (!mp)
return NULL;
- chunk_fetch(mp->msgid, text, sizeof text);
- return (char *) text;
+ chunk_fetch(mp->msgid, (unsigned char *) text, sizeof text);
+ return text;
}
/* Return the subject of a mail message, or (no subject) */
if (!temp) {
notify(player, T("MAIL: You can't reply to nonexistant mail."));
} else {
- char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN];
+ char tbuf1[BUFFER_LEN];
+ unsigned char tbuf2[BUFFER_LEN];
strcpy(tbuf1, uncompress(mp->subject));
- strcpy(tbuf2, get_compressed_message(mp));
- send_mail(player, temp->from, tbuf1, tbuf2, M_FORWARD | M_REPLY,
- 1, 0);
+ u_strcpy(tbuf2, get_compressed_message(mp));
+ send_mail(player, temp->from, tbuf1, (char *) tbuf2,
+ M_FORWARD | M_REPLY, 1, 0);
num_recpts++;
}
} else {
if (!GoodObject(target) || !IsPlayer(target)) {
notify_format(player, T("No such unique player: %s."), current);
} else {
- char tbuf1[BUFFER_LEN], tbuf2[BUFFER_LEN];
+ char tbuf1[BUFFER_LEN];
+ unsigned char tbuf2[BUFFER_LEN];
strcpy(tbuf1, uncompress(mp->subject));
- strcpy(tbuf2, get_compressed_message(mp));
- send_mail(player, target, tbuf1, tbuf2, M_FORWARD, 1, 0);
+ u_strcpy(tbuf2, get_compressed_message(mp));
+ send_mail(player, target, tbuf1, (char *) tbuf2, M_FORWARD, 1, 0);
num_recpts++;
}
}
}
*nm = '\0';
text = compress(newmsg);
- len = strlen((char *) text) + 1;
+ len = u_strlen(text) + 1;
newp->msgid = chunk_create(text, len, 1);
free(text);
mush_free((Malloc_t) newmsg, "string");
tbuf = compress(getstring_noalloc(fp));
}
text = compress(getstring_noalloc(fp));
- len = strlen((char *) text) + 1;
+ len = u_strlen(text) + 1;
mp->msgid = chunk_create(text, len, 1);
free(text);
if (mail_flags & MDBF_SUBJECT)
else
tbuf = NULL;
text = compress(getstring_noalloc(fp));
- len = strlen((char *) text) + 1;
+ len = u_strlen(text) + 1;
mp->msgid = chunk_create(text, len, 1);
free(text);
if (tbuf)