fixed declaration/code mixing
This commit is contained in:
parent
a0a6afc820
commit
ed62570d2e
|
@ -241,8 +241,8 @@ s48_value scx_Get_Wm_Hints(s48_value dpy, s48_value w) {
|
|||
|
||||
s48_value scx_Set_Wm_Hints (s48_value dpy, s48_value w, s48_value hints) {
|
||||
XWMHints WMH;
|
||||
scx_extract_wm_hint_alist(hints, &WMH);
|
||||
S48_DECLARE_GC_PROTECT_3(dpy, w, hints);
|
||||
scx_extract_wm_hint_alist(hints, &WMH);
|
||||
|
||||
XSetWMHints(scx_extract_display(dpy),
|
||||
scx_extract_window(w),
|
||||
|
|
|
@ -51,8 +51,9 @@ s48_value scx_enter_color(const XColor* c) {
|
|||
|
||||
s48_value scx_Create_Colormap (s48_value display, s48_value window,
|
||||
s48_value visual, s48_value alloc) {
|
||||
Colormap cm;
|
||||
S48_DECLARE_GC_PROTECT_4(display, window, visual, alloc);
|
||||
Colormap cm = XCreateColormap(scx_extract_display(display),
|
||||
cm = XCreateColormap(scx_extract_display(display),
|
||||
scx_extract_window(window),
|
||||
scx_extract_visual(visual),
|
||||
scx_extract_colormap_alloc(alloc));
|
||||
|
@ -60,8 +61,9 @@ s48_value scx_Create_Colormap (s48_value display, s48_value window,
|
|||
}
|
||||
|
||||
s48_value scx_Copy_Colormap_And_Free(s48_value display, s48_value colormap) {
|
||||
Colormap cm;
|
||||
S48_DECLARE_GC_PROTECT_2(display, colormap);
|
||||
Colormap cm = XCopyColormapAndFree(scx_extract_display(display),
|
||||
cm = XCopyColormapAndFree(scx_extract_display(display),
|
||||
scx_extract_colormap(colormap));
|
||||
S48_GC_RETURN(scx_enter_colormap(cm));
|
||||
}
|
||||
|
@ -206,8 +208,9 @@ s48_value scx_Lookup_Color(s48_value display, s48_value colormap,
|
|||
s48_value color_name) {
|
||||
XColor cexact, cscreen;
|
||||
s48_value r = S48_NULL;
|
||||
int res;
|
||||
S48_DECLARE_GC_PROTECT_4(display, colormap, color_name, r);
|
||||
int res = XLookupColor(scx_extract_display(display),
|
||||
res = XLookupColor(scx_extract_display(display),
|
||||
scx_extract_colormap(colormap),
|
||||
s48_extract_string(color_name),
|
||||
&cexact, &cscreen);
|
||||
|
|
|
@ -6,8 +6,9 @@ s48_value scx_queued_mode_binding = S48_FALSE;
|
|||
#define scx_extract_queued_mode(x) S48_EXTRACT_ENUM(x, scx_queued_mode_binding)
|
||||
|
||||
s48_value scx_Events_Queued(s48_value display, s48_value mode) {
|
||||
int r;
|
||||
S48_DECLARE_GC_PROTECT_2(display, mode);
|
||||
int r = XEventsQueued(scx_extract_display(display),
|
||||
r = XEventsQueued(scx_extract_display(display),
|
||||
scx_extract_queued_mode(mode));
|
||||
S48_GC_RETURN(s48_enter_integer(r));
|
||||
}
|
||||
|
|
|
@ -242,9 +242,10 @@ s48_value scx_Create_Gc(s48_value display, s48_value drawable,
|
|||
s48_value values) {
|
||||
XGCValues GCV;
|
||||
unsigned long mask;
|
||||
GC gc;
|
||||
S48_DECLARE_GC_PROTECT_3(display, drawable, values);
|
||||
mask = scx_extract_gc_value_alist(values, &GCV);
|
||||
GC gc = XCreateGC(scx_extract_display(display),
|
||||
gc = XCreateGC(scx_extract_display(display),
|
||||
scx_extract_drawable(drawable),
|
||||
mask, &GCV);
|
||||
S48_GC_RETURN(scx_enter_gc(gc));
|
||||
|
|
|
@ -75,8 +75,9 @@ s48_value scx_Ungrab_Button(s48_value dpy, s48_value button,
|
|||
s48_value scx_Grab_Keyboard(s48_value dpy, s48_value win, s48_value ownerp,
|
||||
s48_value pmode, s48_value kmode,
|
||||
s48_value time) {
|
||||
int res;
|
||||
S48_DECLARE_GC_PROTECT_6(dpy, win, ownerp, pmode, kmode, time);
|
||||
int res = XGrabKeyboard( scx_extract_display(dpy),
|
||||
res = XGrabKeyboard( scx_extract_display(dpy),
|
||||
scx_extract_window(win),
|
||||
S48_EXTRACT_BOOLEAN(ownerp),
|
||||
scx_extract_grab_mode(pmode),
|
||||
|
|
|
@ -86,8 +86,9 @@ s48_value scx_Set_Modifier_Mapping(s48_value display, s48_value modmap) {
|
|||
|
||||
for (l = modmap; l != S48_NULL; l = S48_CDR(l)) {
|
||||
int mod = scx_extract_state(S48_CAR(S48_CAR(l)));
|
||||
int j;
|
||||
l2 = S48_CDR(S48_CAR(l));
|
||||
int j = 0;
|
||||
j = 0;
|
||||
for (j = 0; j < max; j++) {
|
||||
if ((mod < 0) || (mod > 7)) continue; /* TODO: error?? */
|
||||
if (l2 != S48_NULL) {
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
s48_value scx_Create_Pixmap(s48_value display, s48_value drawable, s48_value w,
|
||||
s48_value h, s48_value depth) {
|
||||
Pixmap pm;
|
||||
S48_DECLARE_GC_PROTECT_5(display, drawable, w, h, depth);
|
||||
Pixmap pm = XCreatePixmap(scx_extract_display(display),
|
||||
pm = XCreatePixmap(scx_extract_display(display),
|
||||
scx_extract_drawable(drawable),
|
||||
(int)s48_extract_integer(w),
|
||||
(int)s48_extract_integer(h),
|
||||
|
|
|
@ -62,9 +62,10 @@ void scx_extract_text_item_16(s48_value v, XTextItem16* ti) {
|
|||
{
|
||||
if (S48_RECORD_REF(v, 0) != S48_FALSE) {
|
||||
int i, n;
|
||||
XChar2b* s;
|
||||
l = S48_RECORD_REF(v, 0);
|
||||
n = s48_list_length(l);
|
||||
XChar2b* s = (XChar2b*)malloc(n * sizeof(XChar2b));
|
||||
s = (XChar2b*)malloc(n * sizeof(XChar2b));
|
||||
for (i = n-1; i >= 0; i--) {
|
||||
ti->chars[i].byte1 = s48_extract_integer(S48_CAR(S48_CAR(l)));
|
||||
ti->chars[i].byte2 = s48_extract_integer(S48_CDR(S48_CAR(l)));
|
||||
|
|
Loading…
Reference in New Issue