Document, in particular use of UTF-8. Simplify code in a couple of

places, but no functional changes.
This commit is contained in:
Markus Armbruster 2005-06-13 19:02:49 +00:00
parent 9046ff0ad2
commit 71e164ed30
17 changed files with 199 additions and 105 deletions

View file

@ -44,19 +44,19 @@ getstring(char *prompt, char *buf)
{
*buf = '\0';
if (prmptrd(prompt, buf, 1024) < 0)
return 0;
return NULL;
return buf;
}
/*
* Print sub-prompt PROMPT, receive a line of UTF8 input into BUF[1024].
* Print sub-prompt PROMPT, receive a line of UTF-8 input into BUF[1024].
* Return BUF on success, else NULL.
*/
char *
ugetstring(char *prompt, char *buf /* buf is message text */)
ugetstring(char *prompt, char *buf)
{
*buf = '\0';
if (uprmptrd(prompt, buf, 1024) < 0)
return 0;
return NULL;
return buf;
}