void *cbuserdata)
{
- cprintf("part=%s|%s|%s|%s|%s|%d\n",
+ cprintf("part=%s|%s|%s|%s|%s|%ld\n",
name, filename, partnum, disp, cbtype, length);
}
phree(ptr);
}
else if (strncasecmp(cbtype, "multipart/", 10)) {
- cprintf("Part %s: %s (%s) (%d bytes)\r\n",
+ cprintf("Part %s: %s (%s) (%ld bytes)\r\n",
partnum, filename, cbtype, length);
}
}
ret->len = ret->len +
strlen(msg->cm_fields[(int)forder[i]]) + 2;
- lprintf(9, "serialize_message() calling malloc(%d)\n", ret->len);
+ lprintf(9, "serialize_message() calling malloc(%ld)\n", ret->len);
ret->ser = mallok(ret->len);
if (ret->ser == NULL) {
ret->len = 0;
strcpy(&ret->ser[wlen], msg->cm_fields[(int)forder[i]]);
wlen = wlen + strlen(msg->cm_fields[(int)forder[i]]) + 1;
}
- if (ret->len != wlen) lprintf(3, "ERROR: len=%d wlen=%d\n",
+ if (ret->len != wlen) lprintf(3, "ERROR: len=%ld wlen=%ld\n",
ret->len, wlen);
return;
*/
if (msg->cm_fields['T'] == NULL) {
lprintf(9, "Generating timestamp\n");
- sprintf(aaa, "%ld", time(NULL));
+ sprintf(aaa, "%ld", (long)time(NULL));
msg->cm_fields['T'] = strdoop(aaa);
}
"Content-type: %s\n\nmsgid|%ld\nsubmitted|%ld\n"
"bounceto|%s@%s\n"
"remote|%s|0||\n",
- SPOOLMIME, newmsgid, time(NULL),
+ SPOOLMIME, newmsgid, (long)time(NULL),
msg->cm_fields['A'], msg->cm_fields['N'],
recipient );
} else {
buffer_len = (buffer_len * 2);
m = ptr;
- lprintf(9, "buffer_len is %d\n", buffer_len);
+ lprintf(9, "buffer_len is %ld\n", buffer_len);
}
}
* Build a binary message to be saved on disk.
*/
-struct CtdlMessage *make_message(
+static struct CtdlMessage *make_message(
struct usersupp *author, /* author's usersupp structure */
char *recipient, /* NULL if it's not mail */
char *room, /* room where it's going */
sprintf(buf, "cit%ld", author->usernum); /* Path */
msg->cm_fields['P'] = strdoop(buf);
- sprintf(buf, "%ld", time(NULL)); /* timestamp */
+ sprintf(buf, "%ld", (long)time(NULL)); /* timestamp */
msg->cm_fields['T'] = strdoop(buf);
if (fake_name[0]) /* author */
cprintf("%d %ld\n", SEND_BINARY, msglen);
- client_read(&ch, 1); /* 0xFF magic number */
+ client_read((char*)&ch, 1); /* 0xFF magic number */
msg->cm_magic = CTDLMESSAGE_MAGIC;
- client_read(&ch, 1); /* anon type */
+ client_read((char*)&ch, 1); /* anon type */
msg->cm_anon_type = ch;
- client_read(&ch, 1); /* format type */
+ client_read((char*)&ch, 1); /* format type */
msg->cm_format_type = ch;
msglen = msglen - 3;
while (msglen > 0) {
- client_read(&which_field, 1);
+ client_read((char*)&which_field, 1);
if (!isalpha(which_field)) valid_msg = 0;
--msglen;
tempbuf[0] = 0;
do {
- client_read(&ch, 1);
+ client_read((char*)&ch, 1);
--msglen;
a = strlen(tempbuf);
tempbuf[a+1] = 0;