Fixed scx_Get_Gc_Values(diplay, gc, values):

Don't side effect the values argument, it's also (later) used by
scx_extract_gc_value() which expects it to be unmodified.  This patch
makes selectors on graphic contexts usable.
This commit is contained in:
eknauel 2004-05-27 08:39:03 +00:00
parent 3158ebe36b
commit 03489f9c56
1 changed files with 5 additions and 3 deletions

View File

@ -280,10 +280,12 @@ s48_value scx_Change_Gc(s48_value display, s48_value gc, s48_value values) {
s48_value scx_Get_Gc_Values(s48_value display, s48_value gc,
s48_value values) {
unsigned long mask = 0;
s48_value i;
XGCValues GCV;
S48_DECLARE_GC_PROTECT_3(display, gc, values);
for (; values != S48_NULL; values = S48_CDR(values))
mask |= (1L << scx_extract_gc_value(S48_CAR(values)));
S48_DECLARE_GC_PROTECT_4(display, gc, values, i);
for (i = values; i != S48_NULL; i = S48_CDR(i))
mask |= (1L << scx_extract_gc_value(S48_CAR(i)));
if (!XGetGCValues(scx_extract_display(display),
scx_extract_gc(gc),