Bug fix for UTF-8 character support on ubuntu. Needed to link to the ncursesw library.
modified: Makefile modified: README.md modified: src/nms.c
This commit is contained in:
parent
e6ccc65d19
commit
9d7ac87af3
4
Makefile
4
Makefile
@ -14,7 +14,7 @@ SRC=src
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wextra -Wall
|
||||
LDLIBS = -lncurses
|
||||
LDLIBS = -lncursesw
|
||||
NCURSES_H = /usr/include/ncurses.h
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
@ -52,7 +52,7 @@ $(NCURSES_H):
|
||||
sudo pacman -S ncurses ; \
|
||||
else \
|
||||
sudo apt-get update ; \
|
||||
sudo apt-get install ncurses-dev ; \
|
||||
sudo apt-get install lib32ncurses5-dev lib32ncursesw5-dev ; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
|
@ -35,16 +35,16 @@ ls /usr/include | grep ncurses.h
|
||||
If the ncurses.h header file is not present, you may need to install the library. On Ubuntu, type:
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install ncurses-dev
|
||||
sudo apt-get install lib32ncurses5-dev lib32ncursesw5-dev
|
||||
```
|
||||
If you are using a different flavor of linux, search your available packages for "ncurses" and install
|
||||
it.
|
||||
it. If you see two different packages for "ncurses" and "ncursesw", install them both (as shown above
|
||||
in the Ubuntu example).
|
||||
|
||||
Next, download and build the standalone executable:
|
||||
```
|
||||
git clone https://github.com/bartobri/no-more-secrets.git
|
||||
cd ./no-more-secrets
|
||||
git checkout tags/v0.1.0
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
@ -322,7 +322,6 @@ char *getMaskChar(void) {
|
||||
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
|
||||
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
||||
/*
|
||||
"\xc3\x87", "\xc3\xbc", "\xc3\xa9", "\xc3\xa2", "\xc3\xa4", "\xc3\xa0",
|
||||
"\xc3\xa5", "\xc3\xa7", "\xc3\xaa", "\xc3\xab", "\xc3\xa8", "\xc3\xaf",
|
||||
"\xc3\xae", "\xc3\xac", "\xc3\x84", "\xc3\x85", "\xc3\x89", "\xc3\xa6",
|
||||
@ -350,11 +349,9 @@ char *getMaskChar(void) {
|
||||
"\xe2\x89\xa1", "\xe2\x89\xa5", "\xe2\x89\xa4", "\xe2\x8c\xa0",
|
||||
"\xe2\x8c\xa1", "\xe2\x89\x88", "\xe2\x88\x99", "\xe2\x88\x9a",
|
||||
"\xe2\x81\xbf", "\xe2\x96\xa0"
|
||||
*/
|
||||
};
|
||||
|
||||
//return maskChars[rand() % 218];
|
||||
return maskChars[rand() % 90];
|
||||
return maskChars[rand() % 218];
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user