diff --git a/c/xlib/property.c b/c/xlib/property.c index 61f8edf..71467a0 100644 --- a/c/xlib/property.c +++ b/c/xlib/property.c @@ -24,7 +24,7 @@ s48_value Atom_Name (s48_value Xdisplay, s48_value a) { return s48_enter_string (s); } -s48_value List_Properties (s48_value Xwindow, x48_value Xdisplay){ +s48_value List_Properties (s48_value Xwindow, s48_value Xdisplay){ int n, i; Atom *ap; s48_value v; @@ -36,9 +36,9 @@ s48_value List_Properties (s48_value Xwindow, x48_value Xdisplay){ v = s48_make_vector (n, S48_NULL); S48_GC_PROTECT_1 (v); for (i = 0; i < n; i++) { - S48_VECTOR_SET(v, i, s48_enter_integer((long) ap[i])) + S48_VECTOR_SET(v, i, s48_enter_integer((long) ap[i])); } - S48_GC_UNPROTECT; + S48_GC_UNPROTECT(); XFree ((char *)ap); return v; } @@ -51,7 +51,7 @@ s48_value Get_Property(s48_value Xwindow, s48_value Xdisplay, s48_value Xatom_pr int format_ret, i; unsigned long nitems_ret, bytes_left_ret; unsigned char* prop_ret; - s48_value ret, x; + s48_value ret, x, v; S48_DECLARE_GC_PROTECT(2); @@ -70,17 +70,16 @@ s48_value Get_Property(s48_value Xwindow, s48_value Xdisplay, s48_value Xatom_pr if (nitems_ret){ if (format_ret == 8){ char d[nitems_ret+1]; - bcopy((char *)data, d, (int)nitems_ret); + bcopy((char *)prop_ret, d, (int)nitems_ret); d[nitems_ret+1] = (char)0; ret = s48_cons (s48_enter_string(d), ret); }else{ - s48_value v; // Assumes short is 16 bits and int is 32 bits. v = s48_make_vector (nitems_ret, S48_NULL); for (i = 0; i < nitems_ret; i++){ x = s48_enter_integer (format_ret == 16 ? *((short *)prop_ret + i) : *((int *)prop_ret + i)); - S48_VECTOR_SET(v, i, x;) + S48_VECTOR_SET(v, i, x); } ret = s48_cons(v, ret); } @@ -89,7 +88,7 @@ s48_value Get_Property(s48_value Xwindow, s48_value Xdisplay, s48_value Xatom_pr } ret = s48_cons(s48_enter_integer((long)format_ret), ret); ret = s48_cons(s48_enter_integer((long)actual_type_ret), ret); - S48_GC_UNPROTECT; + S48_GC_UNPROTECT(); return ret; } @@ -125,7 +124,7 @@ s48_value Change_Property(s48_value Xdisplay, s48_value Xwindow, } -s48_value P_Delete_Property (s48_value Xdisplay, s48_value Xwindow, +s48_value Delete_Property (s48_value Xdisplay, s48_value Xwindow, s48_value Xatom_prop){ XDeleteProperty (EXTRACT_DISPLAY(Xdisplay), EXTRACT_WINDOW(Xwindow), EXTRACT_ATOM(Xatom_prop)); @@ -140,13 +139,13 @@ s48_value Rotate_Properties (s48_value Xdisplay, s48_value Xwindow, for (i = 0; i < n; i++) { p[i] = s48_extract_integer(S48_VECTOR_REF(Xatom_vec, i)); } - XRotateWindowProperties(EXTRACT_DISPLAY(Xdisplay), EXTRACT_WINDOW(Xwindwo), + XRotateWindowProperties(EXTRACT_DISPLAY(Xdisplay), EXTRACT_WINDOW(Xwindow), p, n, (int)s48_extract_integer(delta)); return S48_UNSPECIFIC; } s48_value Set_Selection_Owner (s48_value Xdisplay, s48_value Xatom_s, - s48_value Xwindow_owner, s58_value time){ + s48_value Xwindow_owner, s48_value time){ XSetSelectionOwner (EXTRACT_DISPLAY(Xdisplay), EXTRACT_ATOM(Xatom_s), EXTRACT_WINDOW(Xwindow_owner), EXTRACT_TIME(time)); @@ -170,7 +169,7 @@ s48_value Convert_Selection (s48_value Xdisplay, s48_value Xatom_s, return S48_UNSPECIFIC; } -viod s48_init_graphics(void) { +void s48_init_property(void) { S48_EXPORT_FUNCTION(Intern_Atom); S48_EXPORT_FUNCTION(Find_Atom); S48_EXPORT_FUNCTION(Atom_Name); @@ -178,7 +177,7 @@ viod s48_init_graphics(void) { S48_EXPORT_FUNCTION(Get_Property); S48_EXPORT_FUNCTION(Change_Property); S48_EXPORT_FUNCTION(Delete_Property); - S48_EXPORT_FUNCTION(Rotate_Property); + S48_EXPORT_FUNCTION(Rotate_Properties); S48_EXPORT_FUNCTION(Set_Selection_Owner); S48_EXPORT_FUNCTION(Get_Selection_Owner); S48_EXPORT_FUNCTION(Convert_Selection);