On Thu, Jan 8, 2009 at 1:14 AM, William Ramsay <ramsa...@comcast.net> wrote:
Hi, William. Sorry for responding so late. > > I am trying to use macros with a program that requires some C > functions. But when I "require-extension syntax-case" and extend easyffi I > get compile errors. If I eliminate either one the code compiles fine. > (I am also using the xlib egg in my program). What exactly do you mean with "extend easyffi"? And what errors do you get? > > While I'm at it I might as well add that I'm having some problems with xlib > - probably because I don't know what I'm doing. > > For instance: (let > ((d-atom (xinternatom (display, > "WM_DELETE_WINDOW", 0) > > creates a proper atom. However it's a long. > > If I try to call (xsetwmprotocols display window d-atom 1) I get an > error because xsetwmprotocols wants a pointer, not a long. How do I > represent the address of d-atom in Scheme - is that even possible? (If I > can figure out how to do this I could probably eliminate the need for > easyffi and solve my macro problem) > Is programming fun or what!!! > I didn't come up with that API, it's taken from the stalin distribution. Somehow you have to convert the atom-identifier into a pointer. Try something like this: (let-location ((atm unsigned-long d-atom)) (xsetwmprotocols ... (location atm) ...)) cheers, felix _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users