Support UTF-8 encoded Unicode for user communications.
(NF_UTF8, togg): New client flag. (flash, wall): User text input filtering. (parse, prmptrd): Normal text input filtering. (uprmptrd, ugetstring): New, to get user text. (getele, flash, wall): Use them. (getele): No need to filter out funny characters; input filtering takes care of them. (sendmessage, ufindbreak): Work on user text. (uprnf): New, to print user text. (rea, gamedown, show_motd): Use it. (prnf): Unused, remove. (pr, upr_player): Normal text output filtering (with highlighting). (pr_flash): User text output filtering.
This commit is contained in:
parent
2508364945
commit
2cc44bb182
14 changed files with 343 additions and 56 deletions
|
@ -47,3 +47,16 @@ getstring(char *prompt, char *buf)
|
|||
return 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print sub-prompt PROMPT, receive a line of UTF8 input into BUF[1024].
|
||||
* Return BUF on success, else NULL.
|
||||
*/
|
||||
char *
|
||||
ugetstring(char *prompt, char *buf /* buf is message text */)
|
||||
{
|
||||
*buf = '\0';
|
||||
if (uprmptrd(prompt, buf, 1024) < 0)
|
||||
return 0;
|
||||
return buf;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue