Outside of commands.c, calls to ctdl_getline() have been replaced with more appropria...
authorArt Cancro <ajc@uncensored.citadel.org>
Thu, 19 Apr 2012 15:36:14 +0000 (11:36 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Thu, 19 Apr 2012 15:36:14 +0000 (11:36 -0400)
citadel/textclient/messages.c
citadel/textclient/screen.h

index d86647c185cb6bd06862dd7eb0e1fd7f8d5574a1..d55d3ba27d73f68104186501c65acda79788c223 100644 (file)
@@ -810,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) {
@@ -1214,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");
@@ -1354,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", qstart, qstart, line);
+
        rewind(qfile);
        line = 0;
        if (fgets(buf, 128, qfile) == NULL) {
index d720b2514ae984040dbcbaf4f4db98be8e8b51f7..8e057964617e9097164efab34bdb2358ff833008 100644 (file)
@@ -26,7 +26,6 @@ void ctdl_beep(void);
 void scr_wait_indicator(int);
 extern char status_line[];
 extern void check_screen_dims(void);
-extern void ctdl_getline(char *string, int lim);
 
 extern int screenwidth;
 extern int screenheight;