projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95b5731
)
The 'negative number for asterisk echo' functionality is no longer in ctdl_getline...
author
Art Cancro
<ajc@uncensored.citadel.org>
Thu, 19 Apr 2012 15:43:47 +0000
(11:43 -0400)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Thu, 19 Apr 2012 15:43:47 +0000
(11:43 -0400)
citadel/textclient/commands.c
patch
|
blob
|
history
diff --git
a/citadel/textclient/commands.c
b/citadel/textclient/commands.c
index e6cbffc774add40160b9eccd602ace210eb69f98..3175f12b350d20005434cafbf1bf54998b19bf08 100644
(file)
--- a/
citadel/textclient/commands.c
+++ b/
citadel/textclient/commands.c
@@
-491,17
+491,13
@@
int yesno_d(int d)
* Function to read a line of text from the terminal.
*
* string Pointer to string buffer
* Function to read a line of text from the terminal.
*
* string Pointer to string buffer
- * lim Maximum length - if negative, echo asterisks instead of characters
+ * lim Maximum length
+ * noshow If nonzero, echo asterisks instead of keystrokes
*/
*/
-void ctdl_getline(char *string, int lim
)
+void ctdl_getline(char *string, int lim
, int noshow)
{
int a, b;
{
int a, b;
- char noshow = 0;
- if (lim < 0) {
- lim = (0 - lim);
- noshow = 1;
- }
strcpy(string, "");
gl_string = string;
async_ka_start();
strcpy(string, "");
gl_string = string;
async_ka_start();
@@
-574,7
+570,7
@@
void strprompt(char *prompt, char *str, int len)
color(DIM_WHITE);
scr_printf(": ");
color(BRIGHT_CYAN);
color(DIM_WHITE);
scr_printf(": ");
color(BRIGHT_CYAN);
- ctdl_getline(buf,
len
);
+ ctdl_getline(buf,
abs(len), (len<0)
);
if (buf[0] != 0) {
strcpy(str, buf);
}
if (buf[0] != 0) {
strcpy(str, buf);
}
@@
-641,7
+637,7
@@
void newprompt(char *prompt, char *str, int len)
color(BRIGHT_MAGENTA);
scr_printf("%s", prompt);
color(DIM_MAGENTA);
color(BRIGHT_MAGENTA);
scr_printf("%s", prompt);
color(DIM_MAGENTA);
- ctdl_getline(str,
len
);
+ ctdl_getline(str,
abs(len), (len<0)
);
color(DIM_WHITE);
}
color(DIM_WHITE);
}
@@
-1057,7
+1053,7
@@
int getcmd(CtdlIPC *ipc, char *argbuf)
/* We've found our command. */
if (requires_string(cptr, cmdpos)) {
argbuf[0] = 0;
/* We've found our command. */
if (requires_string(cptr, cmdpos)) {
argbuf[0] = 0;
- ctdl_getline(argbuf, 64);
+ ctdl_getline(argbuf, 64
, 0
);
} else {
scr_printf("\n");
}
} else {
scr_printf("\n");
}