/*
* $Id$
*
- * Citadel/UX message support routines
+ * Citadel message support routines
* see copyright.txt for copyright information
*/
} else if (strlen(editor_paths[0]) > 0) {
editor_path = editor_paths[0];
} else {
- err_printf
- ("*** No editor available, using built-in editor\n");
+ err_printf("*** No editor available, "
+ "using built-in editor\n");
mode = 0;
}
}
if (mode == 0) {
fp = fopen(filename, "r");
if (fp != NULL) {
- fmout(screenwidth, fp, NULL, NULL, 0, screenheight, 0, 0);
+ fmout(screenwidth, fp, NULL, NULL, 0,
+ screenheight, 0, 0);
beg = ftell(fp);
fclose(fp);
} else {
}
/* Now compose the message... */
- if (client_make_message(ipc, temp, message.recipient, message.anonymous, 0, c, message.subject) != 0) {
+ if (client_make_message(ipc, temp, message.recipient,
+ message.anonymous, 0, c, message.subject) != 0) {
return (2);
}
void *file = NULL; /* The downloaded file */
int r;
- // view image
+ /* view image */
found = -found;
r = CtdlIPCAttachmentDownload(ipc, msg, ptr->number, &file, progress, buf);
if (r / 100 != 2) {
if (r / 100 != 2) {
scr_printf("%s\n", cmd);
} else {
- extract(filename, cmd, 2);
+ extract_token(filename, cmd, 2, '|', sizeof filename);
/*
* Part 1 won't have a filename; use the
* subject of the message instead. IO
We have to load up messages until we find one by us */
char buf[SIZ];
int founda = 0;
- struct ctdlipcmessage *msg;
+ struct ctdlipcmessage *msg = NULL;
/* read the header so we can get 'from=' */
r = CtdlIPCGetSingleMessage(ipc, msg_arr[finda], 1, 0, &msg, buf);
- if (!strncasecmp(msg->author, fullname)) {
+ if (!strncasecmp(msg->author, fullname, sizeof(fullname))) {
a = lasta; /* meesa current */
founda = 1;
}
while (transcript && strlen(transcript)) {
lines_printed = 1;
- extract_token(buf, transcript, 0, '\n');
+ extract_token(buf, transcript, 0, '\n', sizeof buf);
remove_token(transcript, 0, '\n');
pprintf("%s\n", buf);
}