fixed AList_To_GCValues and corrected the representation of gcontext->function.
This commit is contained in:
parent
18b286a92f
commit
a6a8d85ac1
|
@ -3,17 +3,18 @@
|
||||||
|
|
||||||
unsigned long AList_To_GCValues(s48_value alist, XGCValues* GCV) {
|
unsigned long AList_To_GCValues(s48_value alist, XGCValues* GCV) {
|
||||||
unsigned long mask = 0;
|
unsigned long mask = 0;
|
||||||
s48_value l;
|
s48_value l, p;
|
||||||
char* cname;
|
char* cname;
|
||||||
s48_value name, value;
|
s48_value name, value;
|
||||||
|
|
||||||
for (l = alist; !S48_NULL_P(l); l = S48_CDR(l)) {
|
for (l = alist; !S48_NULL_P(l); l = S48_CDR(l)) {
|
||||||
name = S48_CAR(l);
|
p = S48_CAR(l);
|
||||||
value = S48_CDR(l);
|
name = S48_CAR(p);
|
||||||
|
value = S48_CDR(p);
|
||||||
cname = s48_extract_string(S48_SYMBOL_TO_STRING(name));
|
cname = s48_extract_string(S48_SYMBOL_TO_STRING(name));
|
||||||
|
|
||||||
if (strcmp(cname, "function") == 0) {
|
if (strcmp(cname, "function") == 0) {
|
||||||
GCV->function = Symbols_To_Bits(value, 0, Func_Syms);
|
GCV->function = Symbol_To_Bit(value, Func_Syms);
|
||||||
mask |= GCFunction;
|
mask |= GCFunction;
|
||||||
} else if (strcmp(cname, "plane-mask") == 0) {
|
} else if (strcmp(cname, "plane-mask") == 0) {
|
||||||
GCV->plane_mask = EXTRACT_PIXEL(value);
|
GCV->plane_mask = EXTRACT_PIXEL(value);
|
||||||
|
@ -131,7 +132,7 @@ s48_value Get_Gc_Values (s48_value Xgcontext, s48_value Xdisplay) {
|
||||||
res = s48_make_vector(23, S48_FALSE);
|
res = s48_make_vector(23, S48_FALSE);
|
||||||
S48_GC_PROTECT_1(res);
|
S48_GC_PROTECT_1(res);
|
||||||
|
|
||||||
S48_VECTOR_SET(res, 0, s48_enter_integer(GCV.function));
|
S48_VECTOR_SET(res, 0, Bit_To_Symbol(GCV.function, Func_Syms));
|
||||||
S48_VECTOR_SET(res, 1, ENTER_PIXEL(GCV.plane_mask));
|
S48_VECTOR_SET(res, 1, ENTER_PIXEL(GCV.plane_mask));
|
||||||
S48_VECTOR_SET(res, 2, ENTER_PIXEL(GCV.foreground));
|
S48_VECTOR_SET(res, 2, ENTER_PIXEL(GCV.foreground));
|
||||||
S48_VECTOR_SET(res, 3, ENTER_PIXEL(GCV.background));
|
S48_VECTOR_SET(res, 3, ENTER_PIXEL(GCV.background));
|
||||||
|
@ -242,4 +243,5 @@ void s48_init_gcontext(void) {
|
||||||
S48_EXPORT_FUNCTION(Change_Gc);
|
S48_EXPORT_FUNCTION(Change_Gc);
|
||||||
S48_EXPORT_FUNCTION(Set_Gcontext_Dashlist);
|
S48_EXPORT_FUNCTION(Set_Gcontext_Dashlist);
|
||||||
S48_EXPORT_FUNCTION(Set_Gcontext_Clip_Rectangles);
|
S48_EXPORT_FUNCTION(Set_Gcontext_Clip_Rectangles);
|
||||||
|
S48_EXPORT_FUNCTION(Query_Best_Size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue