kbdfs: allow X and x to be used not just for hex composition
This commit is contained in:
parent
2ab25e3ec0
commit
0f50c54b5e
1 changed files with 8 additions and 1 deletions
|
@ -787,6 +787,7 @@ Forward:
|
||||||
|
|
||||||
if(r == 'x' || r == 'X'){
|
if(r == 'x' || r == 'X'){
|
||||||
i = (r == 'X') ? 4 : 6;
|
i = (r == 'X') ? 4 : 6;
|
||||||
|
j = i;
|
||||||
r = 0;
|
r = 0;
|
||||||
do {
|
do {
|
||||||
if(nextrune(rawchan, &rr))
|
if(nextrune(rawchan, &rr))
|
||||||
|
@ -797,14 +798,20 @@ Forward:
|
||||||
r = (r << 4) | (10 + (rr - 'a'));
|
r = (r << 4) | (10 + (rr - 'a'));
|
||||||
else if(rr >= 'A' && rr <= 'F')
|
else if(rr >= 'A' && rr <= 'F')
|
||||||
r = (r << 4) | (10 + (rr - 'A'));
|
r = (r << 4) | (10 + (rr - 'A'));
|
||||||
else
|
else{
|
||||||
|
if(i == j && rr != ';'){
|
||||||
|
r = j == 6 ? 'x' : 'X';
|
||||||
|
goto Nothex;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
} while(--i > 0);
|
} while(--i > 0);
|
||||||
if((i == 0 || rr == ';') && r != 0 && r <= Runemax)
|
if((i == 0 || rr == ';') && r != 0 && r <= Runemax)
|
||||||
goto Forward;
|
goto Forward;
|
||||||
} else {
|
} else {
|
||||||
if(nextrune(rawchan, &rr))
|
if(nextrune(rawchan, &rr))
|
||||||
continue;
|
continue;
|
||||||
|
Nothex:
|
||||||
for(i = 0; i<nelem(tab); i++){
|
for(i = 0; i<nelem(tab); i++){
|
||||||
if(tab[i].ld[0] != r)
|
if(tab[i].ld[0] != r)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue