char text[MAXWORDBUF];
};
-void sttybbs(int cmd);
+void stty_ctdl(int cmd);
int haschar(const char *st, int ch);
void getline(char *string, int lim);
int file_checksum(char *filename);
has_images = 0;
sigcaught = 0;
- sttybbs(1);
+ stty_ctdl(1);
strcpy(reply_to, NO_REPLY_TO);
strcpy(reply_subject, "");
++lines_printed;
lines_printed =
checkpagin(lines_printed, pagin, screenheight);
- sttybbs(0);
+ stty_ctdl(0);
return (0);
}
}
}
pprintf("\n");
- sttybbs(0);
+ stty_ctdl(0);
return (0);
}
if (pagin == 1 && !dest)
color(DIM_WHITE);
- sttybbs(0);
+ stty_ctdl(0);
return (fr);
}
} 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 {
default: /* allow 2+ modes */
e_ex_code = 1; /* start with a failed exit code */
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
editor_pid = fork();
cksum = file_checksum(filename);
if (editor_pid == 0) {
b = ka_wait(&e_ex_code);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
break;
}
}
/* 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 (f == 0) {
freopen(prtfile, "r", stdin);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
ka_system(printcmd);
- sttybbs(SB_NO_INTR);
+ stty_ctdl(SB_NO_INTR);
screen_set();
unlink(prtfile);
exit(0);
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
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);
}