Add completely blank symbol set

The blank symbol set can be used with screen reader software
to prevent it from reading the map symbols.

Prevent a segfault when looking at the map and many symbols
share the same character. Don't list too many symbols when
looking at those, if many share the same character.
This commit is contained in:
Pasi Kallinen
2016-09-20 21:03:47 +03:00
parent 28e36b3136
commit e14120b282
2 changed files with 176 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ const char *new_str;
return 0;
space_left = BUFSZ - strlen(buf) - 1;
if (space_left < 1)
return 0;
(void) strncat(buf, " or ", space_left);
(void) strncat(buf, new_str, space_left - 4);
return 1;
@@ -918,6 +920,10 @@ const char **firstmatch;
* If we are looking at the screen, follow multiple possibilities or
* an ambiguous explanation by something more detailed.
*/
if (found > 4)
Sprintf(out_str, "%s", "That can be many things");
didlook:
if (looked) {
if (found > 1 || need_to_look) {