Improve some unicode functions

This commit is contained in:
Justine Tunney 2021-05-05 07:25:39 -07:00
parent b9187061a7
commit 1b5a5719c3
33 changed files with 8366 additions and 197 deletions

View file

@ -835,6 +835,26 @@ static void OnMouse(char *p) {
}
}
static void Rando1(void) {
long i, n;
n = (byn * bxn) >> 6;
for (i = 0; i < n; ++i) {
board[i] = rand64();
}
}
static void Rando2(void) {
long i, n;
n = (byn * bxn) >> 6;
for (i = 0; i < n; ++i) {
board[i] = rand();
board[i] <<= 31;
board[i] |= rand();
board[i] <<= 2;
board[i] |= rand() & 0b11;
}
}
static void ReadKeyboard(void) {
char buf[32], *p = buf;
memset(buf, 0, sizeof(buf));
@ -861,6 +881,12 @@ static void ReadKeyboard(void) {
case CTRL('V'):
OnPageDown();
break;
case CTRL('R'):
Rando1();
break;
case CTRL('G'):
Rando2();
break;
case 'M':
if (mousemode) {
DisableMouse();