fixed AList_To_GCValues and corrected the representation of gcontext->function.

This commit is contained in:
frese 2001-07-30 14:15:34 +00:00
parent 18b286a92f
commit a6a8d85ac1
1 changed files with 7 additions and 5 deletions

View File

@ -3,17 +3,18 @@
unsigned long AList_To_GCValues(s48_value alist, XGCValues* GCV) {
unsigned long mask = 0;
s48_value l;
s48_value l, p;
char* cname;
s48_value name, value;
for (l = alist; !S48_NULL_P(l); l = S48_CDR(l)) {
name = S48_CAR(l);
value = S48_CDR(l);
p = S48_CAR(l);
name = S48_CAR(p);
value = S48_CDR(p);
cname = s48_extract_string(S48_SYMBOL_TO_STRING(name));
if (strcmp(cname, "function") == 0) {
GCV->function = Symbols_To_Bits(value, 0, Func_Syms);
GCV->function = Symbol_To_Bit(value, Func_Syms);
mask |= GCFunction;
} else if (strcmp(cname, "plane-mask") == 0) {
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);
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, 2, ENTER_PIXEL(GCV.foreground));
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(Set_Gcontext_Dashlist);
S48_EXPORT_FUNCTION(Set_Gcontext_Clip_Rectangles);
S48_EXPORT_FUNCTION(Query_Best_Size);
}