#define IFNEXPERT if ((userflags&US_EXPERT)==0)
-void sttybbs(int cmd);
+void stty_ctdl(int cmd);
void dotgoto(CtdlIPC *ipc, char *towhere, int display_name, int fromungoto);
void progress(CtdlIPC* ipc, unsigned long curr, unsigned long cmax);
int pattern(char *search, char *patn);
return;
}
while (*listing && strlen(listing)) {
- extract_token(buf, listing, 0, '\n');
+ extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
- extract(floorlist[extract_int(buf, 0)], buf, 1);
+ extract_token(floorlist[extract_int(buf, 0)], buf, 1, '|', SIZ);
}
free(listing);
}
snprintf(transmit_cmd, sizeof transmit_cmd, "exec cat %s", tempname);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
system(transmit_cmd);
- sttybbs(SB_NO_INTR);
+ stty_ctdl(SB_NO_INTR);
screen_set();
/* clean up the temporary directory */
*/
void roomdir(CtdlIPC *ipc)
{
- char flnm[SIZ];
+ char flnm[256];
char flsz[32];
- char comment[SIZ];
- char buf[SIZ];
+ char comment[256];
+ char buf[256];
char *listing = NULL; /* Returned directory listing */
int r;
return;
}
- extract(comment, buf, 0);
- extract(flnm, buf, 1);
+ extract_token(comment, buf, 0, '|', sizeof comment);
+ extract_token(flnm, buf, 1, '|', sizeof flnm);
pprintf("\nDirectory of %s on %s\n", flnm, comment);
pprintf("-----------------------\n");
while (*listing && strlen(listing)) {
- extract_token(buf, listing, 0, '\n');
+ extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
- extract(flnm, buf, 0);
- extract(flsz, buf, 1);
- extract(comment, buf, 2);
+ extract_token(flnm, buf, 0, '|', sizeof flnm);
+ extract_token(flsz, buf, 1, '|', sizeof flsz);
+ extract_token(comment, buf, 2, '|', sizeof comment);
if (strlen(flnm) <= 14)
pprintf("%-14s %8s %s\n", flnm, flsz, comment);
else
*/
void whoknows(CtdlIPC *ipc)
{
- char buf[SIZ];
+ char buf[256];
char *listing = NULL;
int r;
return;
}
while (strlen(listing) > 0) {
- extract_token(buf, listing, 0, '\n');
+ extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
if (sigcaught == 0)
pprintf("%s\n", buf);
snprintf(tmp, sizeof tmp, "WINDOW_TITLE=%s", desc);
putenv(tmp);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
editor_pid = fork();
if (editor_pid == 0) {
chmod(temp, 0600);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
scr_printf("Executed %s\n", editor_paths[0]);
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
} else {
scr_printf("Entering %s. "