From: Art Cancro Date: Thu, 19 Apr 2012 15:36:14 +0000 (-0400) Subject: Outside of commands.c, calls to ctdl_getline() have been replaced with more appropria... X-Git-Tag: v8.11~86 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=b969641f53e87a0bd7ad7157e5a51f6ab38218c3 Outside of commands.c, calls to ctdl_getline() have been replaced with more appropriate functions --- diff --git a/citadel/textclient/messages.c b/citadel/textclient/messages.c index d86647c18..d55d3ba27 100644 --- a/citadel/textclient/messages.c +++ b/citadel/textclient/messages.c @@ -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) { diff --git a/citadel/textclient/screen.h b/citadel/textclient/screen.h index d720b2514..8e0579646 100644 --- a/citadel/textclient/screen.h +++ b/citadel/textclient/screen.h @@ -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;