3 * More client-side support functions.
4 * Unlike routines.c, some of these DO use global variables.
11 #include <sys/types.h>
19 #if TIME_WITH_SYS_TIME
20 # include <sys/time.h>
24 # include <sys/time.h>
36 #include "citadel_decls.h"
37 #include "routines2.h"
47 void interr(int errnum);
48 void strprompt(char *prompt, char *str, int len);
49 void newprompt(char *prompt, char *str, int len);
50 void sttybbs(int cmd);
52 void serv_write(char *buf, int nbytes);
53 int haschar(char *st, int ch);
54 void progress(long int curr, long int cmax);
58 extern char tempdir[];
59 extern char *axdefs[7];
60 extern long highest_msg_read;
61 extern long maxmsgnum;
62 extern unsigned room_flags;
63 extern int screenwidth;
66 int eopen(char *name, int mode)
69 ret = open(name, mode);
71 err_printf("Cannot open file '%s', mode=%d, errno=%d\n",
79 int room_prompt(int qrflags)
80 { /* return proper room prompt character */
83 if (qrflags & QR_DIRECTORY)
85 if ((a == ']') && (qrflags & QR_NETWORK))
87 if ((a == '>') && (qrflags & QR_NETWORK))
93 { /* register with name and address */
103 char tmpcountry[SIZ];
113 strcpy(tmpstate, "");
115 strcpy(tmpphone, "");
116 strcpy(tmpemail, "");
117 strcpy(tmpcountry, "");
119 serv_puts("GREG _SELF_");
123 while (serv_gets(buf), strcmp(buf, "000")) {
125 strcpy(tmpname, buf);
127 strcpy(tmpaddr, buf);
129 strcpy(tmpcity, buf);
131 strcpy(tmpstate, buf);
135 strcpy(tmpphone, buf);
137 strcpy(tmpemail, buf);
139 strcpy(tmpcountry, buf);
143 strprompt("REAL name", tmpname, 29);
144 strprompt("Address", tmpaddr, 24);
145 strprompt("City/town", tmpcity, 14);
146 strprompt("State/province", tmpstate, 2);
147 strprompt("ZIP/Postal Code", tmpzip, 10);
148 strprompt("Country", tmpcountry, 31);
149 strprompt("Telephone number", tmpphone, 14);
153 strcpy(holdemail, tmpemail);
154 strprompt("Email address", tmpemail, 31);
155 sprintf(buf, "QDIR %s", tmpemail);
159 extract_token(diruser, &buf[4], 0, '@');
160 extract_token(dirnode, &buf[4], 1, '@');
163 if ((strcasecmp(diruser, fullname))
164 || (strcasecmp(dirnode, serv_info.serv_nodename))) {
166 "\nYou can't use %s as your address.\n",
169 "It is already in use by %s @ %s.\n",
172 strcpy(tmpemail, holdemail);
177 /* now send the registration info back to the server */
181 scr_printf("%s\n", &buf[4]);
191 serv_puts(tmpcountry);
197 { /* make all messages old in current room */
200 if (rc_alt_semantics) {
201 if (maxmsgnum == highest_msg_read == 0) {
202 /* err_printf("maxmsgnum == highest_msg_read == 0\n"); */
205 snprintf(buf, sizeof(buf), "SLRP %ld",
206 (maxmsgnum > highest_msg_read) ?
207 maxmsgnum : highest_msg_read);
210 serv_puts("SLRP HIGHEST");
214 scr_printf("%s\n", &buf[4]);
218 * only make messages old in this room that have been read
224 sprintf(buf, "SLRP %ld", highest_msg_read);
228 scr_printf("%s\n", &buf[4]);
233 * This routine completes a client upload
235 void do_upload(int fd)
239 long transmitted_bytes, total_bytes;
243 /* learn the size of the file */
244 total_bytes = lseek(fd, 0L, 2);
247 transmitted_bytes = 0L;
248 progress(transmitted_bytes, total_bytes);
250 bytes_to_send = read(fd, tbuf, 4096);
251 if (bytes_to_send > 0) {
252 sprintf(buf, "WRIT %d", bytes_to_send);
256 bytes_expected = atoi(&buf[4]);
257 serv_write(tbuf, bytes_expected);
259 scr_printf("%s\n", &buf[4]);
262 transmitted_bytes = transmitted_bytes + (long) bytes_to_send;
263 progress(transmitted_bytes, total_bytes);
264 } while (bytes_to_send > 0);
266 /* close the upload file, locally and at the server */
270 scr_printf("%s\n", &buf[4]);
275 * client-based uploads (for users with their own clientware)
277 void cli_upload(void)
286 if ((room_flags & QR_UPLOAD) == 0) {
287 scr_printf("*** You cannot upload to this room.\n");
290 newprompt("File to be uploaded: ", flnm, 55);
291 fd = open(flnm, O_RDONLY);
293 scr_printf("Cannot open '%s': %s\n", flnm, strerror(errno));
296 scr_printf("Enter a description of this file:\n");
297 newprompt(": ", desc, 75);
299 /* keep generating filenames in hope of finding a unique one */
303 return; /* fail if tried 10 times */
305 while ((strlen(buf) > 0) && (haschar(buf, '/')))
306 strcpy(buf, &buf[1]);
308 sprintf(&buf[strlen(buf)], "%d", a);
309 sprintf(tbuf, "UOPN %s|%s", buf, desc);
313 scr_printf("%s\n", &buf[4]);
315 } while (buf[0] != '2');
317 /* at this point we have an open upload file at the server */
323 * Function used for various image upload commands
325 void cli_image_upload(char *keyname)
331 sprintf(buf, "UIMG 0|%s", keyname);
335 scr_printf("%s\n", &buf[4]);
338 newprompt("Image file to be uploaded: ", flnm, 55);
339 fd = open(flnm, O_RDONLY);
341 scr_printf("Cannot open '%s': %s\n", flnm, strerror(errno));
344 sprintf(buf, "UIMG 1|%s", keyname);
348 scr_printf("%s\n", &buf[4]);
356 * protocol-based uploads (Xmodem, Ymodem, Zmodem)
359 { /* c = upload mode */
369 if ((room_flags & QR_UPLOAD) == 0) {
370 scr_printf("*** You cannot upload to this room.\n");
373 /* we don't need a filename when receiving batch y/z modem */
374 if ((c == 2) || (c == 3))
377 newprompt("Enter filename: ", flnm, 15);
379 for (a = 0; a < strlen(flnm); ++a)
380 if ((flnm[a] == '/') || (flnm[a] == '\\') || (flnm[a] == '>')
381 || (flnm[a] == '?') || (flnm[a] == '*')
382 || (flnm[a] == ';') || (flnm[a] == '&'))
385 newprompt("Enter a short description of the file:\n: ", desc, 150);
387 /* create a temporary directory... */
388 if (mkdir(tempdir, 0700) != 0) {
389 scr_printf("*** Could not create temporary directory %s: %s\n",
390 tempdir, strerror(errno));
393 /* now do the transfer ... in a separate process */
400 scr_printf("Receiving %s - press Ctrl-D to end.\n", flnm);
401 fp = fopen(flnm, "w");
417 execlp("rx", "rx", flnm, NULL);
422 execlp("rb", "rb", NULL);
427 execlp("rz", "rz", NULL);
433 } while ((b != xfer_pid) && (b != (-1)));
438 scr_printf("\r*** Transfer unsuccessful.\n");
442 scr_printf("\r*** Transfer successful. Sending file(s) to server...\n");
443 sprintf(buf, "cd %s; ls", tempdir);
444 lsfp = popen(buf, "r");
446 while (fgets(flnm, sizeof flnm, lsfp) != NULL) {
447 flnm[strlen(flnm) - 1] = 0;
448 sprintf(buf, "%s/%s", tempdir, flnm);
449 fd = open(buf, O_RDONLY);
453 sprintf(buf, "UOPN %s|%s", flnm, desc);
455 sprintf(&buf[strlen(buf)],
460 } while ((buf[0] != '2') && (a < 100));
463 a = read(fd, tbuf, 4096);
465 sprintf(buf, "WRIT %d", a);
475 scr_printf("%s\n", &buf[4]);
486 void val_user(char *user, int do_validate)
493 sprintf(cmd, "GREG %s", user);
502 scr_printf("User #%s - %s ", buf, &cmd[4]);
504 scr_printf("PW: %s\n", buf);
506 scr_printf("%s\n", buf);
508 scr_printf("%s\n", buf);
510 scr_printf("%s, ", buf);
512 scr_printf("%s ", buf);
514 scr_printf("%s\n", buf);
516 scr_printf("%s\n", buf);
520 scr_printf("%s\n", buf);
522 scr_printf("%s\n", buf);
523 } while (strcmp(buf, "000"));
524 scr_printf("Current access level: %d (%s)\n", ax, axdefs[ax]);
526 scr_printf("%-30s\n%s\n", user, &cmd[4]);
530 /* now set the access level */
531 ax = intprompt("Access level", ax, 0, 6);
532 sprintf(cmd, "VALI %s|%d", user, ax);
536 scr_printf("%s\n", &cmd[4]);
543 { /* validate new users */
554 scr_printf("%s\n", &cmd[4]);
556 extract(buf, cmd, 0);
557 val_user(&buf[4], 1);
559 } while (finished == 0);
569 signal(SIGINT, SIG_DFL);
570 signal(SIGQUIT, SIG_DFL);
571 execlp(getenv("SHELL"), getenv("SHELL"), NULL);
572 err_printf("Could not open a shell: %s\n", strerror(errno));
577 } while ((a != b) && (a != (-1)));
583 * <.A>ide <F>ile <D>elete command
585 void deletefile(void)
590 newprompt("Filename: ", filename, 31);
591 if (strlen(filename) == 0)
593 sprintf(cmd, "DELF %s", filename);
596 err_printf("%s\n", &cmd[4]);
600 * <.A>ide <F>ile <S>end command
602 void netsendfile(void)
604 char filename[32], destsys[20], cmd[SIZ];
606 newprompt("Filename: ", filename, 31);
607 if (strlen(filename) == 0)
609 newprompt("System to send to: ", destsys, 19);
610 sprintf(cmd, "NETF %s|%s", filename, destsys);
613 err_printf("%s\n", &cmd[4]);
618 * <.A>ide <F>ile <M>ove command
623 char newroom[ROOMNAMELEN];
626 newprompt("Filename: ", filename, 63);
627 if (strlen(filename) == 0)
629 newprompt("Enter target room: ", newroom, ROOMNAMELEN - 1);
631 sprintf(cmd, "MOVF %s|%s", filename, newroom);
634 err_printf("%s\n", &cmd[4]);
639 * list of users who have filled out a bio
649 pprintf("%s\n", &buf[4]);
652 while (serv_gets(buf), strcmp(buf, "000")) {
653 if ((pos + strlen(buf) + 5) > screenwidth) {
657 pprintf("%s, ", buf);
658 pos = pos + strlen(buf) + 2;
660 pprintf("%c%c \n\n", 8, 8);
673 newprompt("Read bio for who ('?' for list) : ", who, 25);
675 if (!strcmp(who, "?"))
677 } while (!strcmp(who, "?"));
678 sprintf(buf, "RBIO %s", who);
682 pprintf("%s\n", &buf[4]);
685 while (serv_gets(buf), strcmp(buf, "000")) {
686 pprintf("%s\n", buf);
692 * General system configuration command
694 void do_system_configuration(void)
699 int expire_value = 0;
703 /* Clear out the config buffers */
704 memset(&sc[0][0], 0, sizeof(sc));
706 /* Fetch the current config */
707 serv_puts("CONF get");
711 while (serv_gets(buf), strcmp(buf, "000")) {
713 strcpy(&sc[a][0], buf);
718 /* Fetch the expire policy (this will silently fail on old servers,
719 * resulting in "default" policy)
721 serv_puts("GPEX site");
724 expire_mode = extract_int(&buf[4], 0);
725 expire_value = extract_int(&buf[4], 1);
729 /* Identification parameters */
731 strprompt("Node name", &sc[0][0], 15);
732 strprompt("Fully qualified domain name", &sc[1][0], 63);
733 strprompt("Human readable node name", &sc[2][0], 20);
734 strprompt("Modem dialup number", &sc[3][0], 15);
735 strprompt("Geographic location of this system", &sc[12][0], 31);
736 strprompt("Name of system administrator", &sc[13][0], 25);
737 strprompt("Paginator prompt", &sc[10][0], 79);
739 /* this prompt is commented out until we finish the moderation system
740 strprompt("Default moderation filter for new users", &sc[25][0], 4);
743 /* Security parameters */
745 sprintf(&sc[7][0], "%d", (boolprompt(
746 "Require registration for new users",
748 sprintf(&sc[29][0], "%d", (boolprompt(
749 "Disable self-service user account creation",
751 strprompt("Initial access level for new users", &sc[6][0], 1);
752 strprompt("Access level required to create rooms", &sc[19][0], 1);
753 sprintf(&sc[4][0], "%d", (boolprompt(
754 "Automatically give room aide privs to a user who creates a private room",
757 sprintf(&sc[8][0], "%d", (boolprompt(
758 "Automatically move problem user messages to twit room",
761 strprompt("Name of twit room", &sc[9][0], ROOMNAMELEN);
762 sprintf(&sc[11][0], "%d", (boolprompt(
763 "Restrict Internet mail to only those with that privilege",
765 sprintf(&sc[26][0], "%d", (boolprompt(
766 "Allow Aides to Zap (forget) rooms",
769 if (strlen(&sc[18][0]) > 0) logpages = 1;
771 logpages = boolprompt("Log all pages", logpages);
773 strprompt("Name of logging room", &sc[18][0], ROOMNAMELEN);
782 strprompt("Server connection idle timeout (in seconds)", &sc[5][0], 4);
783 strprompt("Maximum concurrent sessions", &sc[14][0], 4);
784 strprompt("Maximum message length", &sc[20][0], 20);
785 strprompt("Minimum number of worker threads", &sc[21][0], 3);
786 strprompt("Maximum number of worker threads", &sc[22][0], 3);
788 /* no longer applicable ... deprecated
789 strprompt("Server-to-server networking password", &sc[15][0], 19);
792 strprompt("How often to run network jobs (in seconds)", &sc[28][0], 5);
793 strprompt("SMTP server port (-1 to disable)", &sc[24][0], 5);
794 strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
795 strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
797 /* Expiry settings */
798 strprompt("Default user purge time (days)", &sc[16][0], 5);
799 strprompt("Default room purge time (days)", &sc[17][0], 5);
801 /* Angels and demons dancing in my head... */
803 sprintf(buf, "%d", expire_mode);
804 strprompt("System default message expire policy (? for list)",
808 "1. Never automatically expire messages\n"
809 "2. Expire by message count\n"
810 "3. Expire by message age\n");
812 } while ((buf[0] < 49) || (buf[0] > 51));
813 expire_mode = buf[0] - 48;
815 /* ...lunatics and monsters underneath my bed */
816 if (expire_mode == 2) {
817 sprintf(buf, "%d", expire_value);
818 strprompt("Keep how many messages online?", buf, 10);
819 expire_value = atol(buf);
821 if (expire_mode == 3) {
822 sprintf(buf, "%d", expire_value);
823 strprompt("Keep messages for how many days?", buf, 10);
824 expire_value = atol(buf);
827 scr_printf("Save this configuration? ");
829 serv_puts("CONF set");
832 for (a = 0; a < 30; ++a)
833 serv_puts(&sc[a][0]);
836 snprintf(buf, sizeof buf, "SPEX site|%d|%d",
837 expire_mode, expire_value);
845 * support function for do_internet_configuration()
847 void get_inet_rec_type(char *buf) {
850 keyopt(" <1> localhost (Alias for this computer)\n");
851 keyopt(" <2> gateway domain (Domain for all Citadel systems)\n");
852 keyopt(" <3> smart-host (Forward all outbound mail to this host)\n");
853 keyopt(" <4> directory (Consult the Global Address Book)\n");
854 sel = intprompt("Which one", 1, 1, 4);
856 case 1: strcpy(buf, "localhost");
858 case 2: strcpy(buf, "gatewaydomain");
860 case 3: strcpy(buf, "smarthost");
862 case 4: strcpy(buf, "directory");
869 * Internet mail configuration
871 void do_internet_configuration(void) {
881 sprintf(buf, "CONF getsys|%s", INTERNETCFG);
884 if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
886 if (num_recs == 1) recs = malloc(sizeof(char *));
887 else recs = realloc(recs, (sizeof(char *)) * num_recs);
888 recs[num_recs-1] = malloc(SIZ);
889 strcpy(recs[num_recs-1], buf);
895 scr_printf("### Host or domain Record type \n");
897 scr_printf("--- -------------------------------------------------- --------------------\n");
898 for (i=0; i<num_recs; ++i) {
900 scr_printf("%3d ", i+1);
901 extract(buf, recs[i], 0);
903 scr_printf("%-50s ", buf);
904 extract(buf, recs[i], 1);
905 color(BRIGHT_MAGENTA);
906 scr_printf("%-20s\n", buf);
910 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
915 recs = malloc(sizeof(char *));
916 else recs = realloc(recs,
917 (sizeof(char *)) * num_recs);
918 newprompt("Enter host name: ",
921 get_inet_rec_type(&buf[strlen(buf)]);
922 recs[num_recs-1] = strdup(buf);
925 i = intprompt("Delete which one",
929 for (j=i; j<num_recs; ++j)
933 sprintf(buf, "CONF putsys|%s",
938 for (i=0; i<num_recs; ++i) {
944 scr_printf("%s\n", &buf[4]);
949 quitting = boolprompt(
950 "Quit without saving", 0);
955 } while (quitting == 0);
958 for (i=0; i<num_recs; ++i) free(recs[i]);
966 * Edit network configuration for room sharing, mailing lists, etc.
968 void network_config_management(char *entrytype, char *comment) {
969 char filename[PATH_MAX];
970 char changefile[PATH_MAX];
981 if (strlen(editor_path) == 0) {
982 scr_printf("You must have an external editor configured in"
983 " order to use this function.\n");
987 snprintf(filename, sizeof filename, "%s.listedit", tmpnam(NULL));
988 snprintf(changefile, sizeof changefile, "%s.listedit", tmpnam(NULL));
990 tempfp = fopen(filename, "w");
991 if (tempfp == NULL) {
992 err_printf("Cannot open %s: %s\n", filename, strerror(errno));
996 fprintf(tempfp, "# Configuration for room: %s\n", room_name);
997 fprintf(tempfp, "# %s\n", comment);
998 fprintf(tempfp, "# Specify one per line.\n"
1003 if (buf[0] == '1') {
1004 while(serv_gets(buf), strcmp(buf, "000")) {
1005 extract(instr, buf, 0);
1006 if (!strcasecmp(instr, entrytype)) {
1007 extract(addr, buf, 1);
1008 fprintf(tempfp, "%s\n", addr);
1014 e_ex_code = 1; /* start with a failed exit code */
1015 editor_pid = fork();
1016 cksum = file_checksum(filename);
1017 if (editor_pid == 0) {
1018 chmod(filename, 0600);
1020 sttybbs(SB_RESTORE);
1021 putenv("WINDOW_TITLE=Network configuration");
1022 execlp(editor_path, editor_path, filename, NULL);
1025 if (editor_pid > 0) {
1028 b = ka_wait(&e_ex_code);
1029 } while ((b != editor_pid) && (b >= 0));
1035 if (file_checksum(filename) == cksum) {
1036 err_printf("*** Not saving changes.\n");
1040 if (e_ex_code == 0) { /* Save changes */
1041 changefp = fopen(changefile, "w");
1044 if (buf[0] == '1') {
1045 while(serv_gets(buf), strcmp(buf, "000")) {
1046 extract(instr, buf, 0);
1047 if (strcasecmp(instr, entrytype)) {
1048 fprintf(changefp, "%s\n", buf);
1052 tempfp = fopen(filename, "r");
1053 while (fgets(buf, sizeof buf, tempfp) != NULL) {
1054 for (i=0; i<strlen(buf); ++i) {
1055 if (buf[i] == '#') buf[i] = 0;
1058 if (strlen(buf) > 0) {
1059 fprintf(changefp, "%s|%s\n", entrytype, buf);
1065 /* now write it to the server... */
1068 if (buf[0] == '4') {
1069 changefp = fopen(changefile, "r");
1070 if (changefp != NULL) {
1071 while (fgets(buf, sizeof buf,
1072 changefp) != NULL) {
1073 buf[strlen(buf) - 1] = 0;
1082 unlink(filename); /* Delete the temporary files */
1088 * IGnet node configuration
1090 void do_ignet_configuration(void) {
1100 sprintf(buf, "CONF getsys|%s", IGNETCFG);
1103 if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
1105 if (num_recs == 1) recs = malloc(sizeof(char *));
1106 else recs = realloc(recs, (sizeof(char *)) * num_recs);
1107 recs[num_recs-1] = malloc(SIZ);
1108 strcpy(recs[num_recs-1], buf);
1113 color(BRIGHT_WHITE);
1122 "------------------ "
1123 "-------------------------------- "
1125 for (i=0; i<num_recs; ++i) {
1127 scr_printf("%3d ", i+1);
1128 extract(buf, recs[i], 0);
1130 scr_printf("%-16s ", buf);
1131 extract(buf, recs[i], 1);
1132 color(BRIGHT_MAGENTA);
1133 scr_printf("%-18s ", buf);
1134 extract(buf, recs[i], 2);
1136 scr_printf("%-32s ", buf);
1137 extract(buf, recs[i], 3);
1138 color(BRIGHT_MAGENTA);
1139 scr_printf("%-3s\n", buf);
1143 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
1148 recs = malloc(sizeof(char *));
1149 else recs = realloc(recs,
1150 (sizeof(char *)) * num_recs);
1151 newprompt("Enter node name : ", buf, 16);
1153 newprompt("Enter shared secret: ",
1154 &buf[strlen(buf)], 18);
1156 newprompt("Enter host or IP : ",
1157 &buf[strlen(buf)], 32);
1158 strcat(buf, "|504");
1159 strprompt("Enter port number : ",
1160 &buf[strlen(buf)-3], 5);
1161 recs[num_recs-1] = strdup(buf);
1164 i = intprompt("Delete which one",
1165 1, 1, num_recs) - 1;
1168 for (j=i; j<num_recs; ++j)
1169 recs[j] = recs[j+1];
1172 sprintf(buf, "CONF putsys|%s", IGNETCFG);
1175 if (buf[0] == '4') {
1176 for (i=0; i<num_recs; ++i) {
1182 scr_printf("%s\n", &buf[4]);
1187 quitting = boolprompt(
1188 "Quit without saving", 0);
1193 } while (quitting == 0);
1196 for (i=0; i<num_recs; ++i) free(recs[i]);
1202 * Filter list configuration
1204 void do_filterlist_configuration(void) {
1214 sprintf(buf, "CONF getsys|%s", FILTERLIST);
1217 if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
1219 if (num_recs == 1) recs = malloc(sizeof(char *));
1220 else recs = realloc(recs, (sizeof(char *)) * num_recs);
1221 recs[num_recs-1] = malloc(SIZ);
1222 strcpy(recs[num_recs-1], buf);
1227 color(BRIGHT_WHITE);
1235 "---------------------------- "
1236 "---------------------------- "
1239 for (i=0; i<num_recs; ++i) {
1241 scr_printf("%3d ", i+1);
1242 extract(buf, recs[i], 0);
1244 scr_printf("%-28s ", buf);
1245 extract(buf, recs[i], 1);
1246 color(BRIGHT_MAGENTA);
1247 scr_printf("%-28s ", buf);
1248 extract(buf, recs[i], 2);
1250 scr_printf("%-16s\n", buf);
1251 extract(buf, recs[i], 3);
1255 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
1260 recs = malloc(sizeof(char *));
1261 else recs = realloc(recs,
1262 (sizeof(char *)) * num_recs);
1263 newprompt("Enter user name: ", buf, 28);
1265 newprompt("Enter room name: ",
1266 &buf[strlen(buf)], 28);
1268 newprompt("Enter node name: ",
1269 &buf[strlen(buf)], 16);
1271 recs[num_recs-1] = strdup(buf);
1274 i = intprompt("Delete which one",
1275 1, 1, num_recs) - 1;
1278 for (j=i; j<num_recs; ++j)
1279 recs[j] = recs[j+1];
1282 sprintf(buf, "CONF putsys|%s", FILTERLIST);
1285 if (buf[0] == '4') {
1286 for (i=0; i<num_recs; ++i) {
1292 scr_printf("%s\n", &buf[4]);
1297 quitting = boolprompt(
1298 "Quit without saving", 0);
1303 } while (quitting == 0);
1306 for (i=0; i<num_recs; ++i) free(recs[i]);