Added/renamed Event_Mask_Syms. Changed Symbol(s)_To_Bit(s).
This commit is contained in:
parent
4308e681f3
commit
704e6cc895
|
@ -42,6 +42,7 @@ s48_value Bits_To_Symbols(unsigned long bits, SYMDESCR* table) {
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
//if (res == S48_NULL) res = s48_enter_integer(bits);
|
||||||
|
|
||||||
S48_GC_UNPROTECT();
|
S48_GC_UNPROTECT();
|
||||||
return res;
|
return res;
|
||||||
|
@ -63,7 +64,7 @@ unsigned long Symbol_To_Bit(s48_value Sym, SYMDESCR* table) {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; table[i].val != 0 ;i++) {
|
for (i=0; table[i].val != 0 ;i++) {
|
||||||
if (strcmp(sym, table[i].name) == 0) {
|
if (strcmp(sym, table[i].name) == 0) {
|
||||||
res = res | table[i].val;
|
return table[i].val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -71,9 +72,9 @@ unsigned long Symbol_To_Bit(s48_value Sym, SYMDESCR* table) {
|
||||||
|
|
||||||
unsigned long Symbols_To_Bits(s48_value Syms, SYMDESCR* table) {
|
unsigned long Symbols_To_Bits(s48_value Syms, SYMDESCR* table) {
|
||||||
unsigned long res = 0;
|
unsigned long res = 0;
|
||||||
s48_value l;
|
s48_value l = Syms;
|
||||||
|
|
||||||
for (l = Syms; !S48_NULL_P(l); l = S48_CDR(l)) {
|
for (; !S48_NULL_P(l); l = S48_CDR(l)) {
|
||||||
res |= Symbol_To_Bit(S48_CAR(l), table);
|
res |= Symbol_To_Bit(S48_CAR(l), table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@ SYMDESCR Closemode_Syms[] = {
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
SYMDESCR Event_Syms[] = {
|
SYMDESCR Event_Mask_Syms[] = {
|
||||||
{ "key-press", KeyPressMask },
|
{ "key-press", KeyPressMask },
|
||||||
{ "key-release", KeyReleaseMask },
|
{ "key-release", KeyReleaseMask },
|
||||||
{ "button-press", ButtonPressMask },
|
{ "button-press", ButtonPressMask },
|
||||||
|
|
Loading…
Reference in New Issue