From a6a8d85ac1ec1d31bf5a96386394b45d7cca1c1f Mon Sep 17 00:00:00 2001 From: frese Date: Mon, 30 Jul 2001 14:15:34 +0000 Subject: [PATCH] fixed AList_To_GCValues and corrected the representation of gcontext->function. --- c/xlib/gcontext.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/c/xlib/gcontext.c b/c/xlib/gcontext.c index 48d5c2d..3f00f86 100644 --- a/c/xlib/gcontext.c +++ b/c/xlib/gcontext.c @@ -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); }