]> code.citadel.org Git - citadel.git/blobdiff - citadel/textclient/messages.c
Adjusted qstart/qend defaults
[citadel.git] / citadel / textclient / messages.c
index 5f29bf0addcded03f2bcc8e8d9ae121540539033..6cc8f6a6f09017a81c321a9bbce98601d599afc8 100644 (file)
@@ -70,7 +70,6 @@ struct cittext {
 
 void stty_ctdl(int cmd);
 int haschar(const char *st, int ch);
-void ctdl_getline(char *string, int lim);
 int file_checksum(char *filename);
 void progress(CtdlIPC* ipc, unsigned long curr, unsigned long cmax);
 
@@ -811,14 +810,12 @@ void replace_string(char *filename, long int startpos)
        long msglen = 0L;
        int rv;
 
-       scr_printf("Enter text to be replaced:\n: ");
-       ctdl_getline(srch_str, (sizeof(srch_str)-1) );
+       newprompt("Enter test to be replaced: ", srch_str, (sizeof(srch_str)-1) );
        if (IsEmptyStr(srch_str)) {
                return;
        }
 
-       scr_printf("Enter text to replace it with:\n: ");
-       ctdl_getline(rplc_str, (sizeof(rplc_str)-1) );
+       newprompt("Enter text to replace it with: ", rplc_str, (sizeof(rplc_str)-1) );
 
        fp = fopen(filename, "r+");
        if (fp == NULL) {
@@ -1215,10 +1212,10 @@ int entmsg(CtdlIPC *ipc,
                        if (is_reply) {
                                strcpy(buf, reply_to);
                        } else {
-                               scr_printf("Enter recipient: ");
-                               ctdl_getline(buf, (SIZ-100) );
-                               if (IsEmptyStr(buf))
+                               newprompt("Enter recipient: ", buf, SIZ-100);
+                               if (IsEmptyStr(buf)) {
                                        return (1);
+                               }
                        }
                } else
                        strcpy(buf, "sysop");
@@ -1355,12 +1352,10 @@ void process_quote(void)
        while (fgets(buf, 128, qfile) != NULL) {
                scr_printf("%3d %s", ++line, buf);
        }
-       scr_printf("Begin quoting at [1] : ");
-       ctdl_getline(buf, 4);
-       qstart = (buf[0] == 0) ? (1) : atoi(buf);
-       scr_printf("  End quoting at [%d] : ", line);
-       ctdl_getline(buf, 4);
-       qend = (buf[0] == 0) ? (line) : atoi(buf);
+
+       qstart = intprompt("Begin quoting at", 1, 1, line);
+       qend = intprompt("  End quoting at", line, qstart, line);
+
        rewind(qfile);
        line = 0;
        if (fgets(buf, 128, qfile) == NULL) {