X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela_FTGL.lisp;h=8fa2bd02fa625e9491fdf04b5ed1e5da2299a0f4;hb=377bf34ac61998549b24e339e3a3eea80734b6e3;hp=d1b0d19978c26ea2427ac2502de44a1da3b99bc5;hpb=c0f1e1b81f3bc804b3ff9da22581d7e621670e9a;p=gacela.git diff --git a/gacela_FTGL.lisp b/gacela_FTGL.lisp index d1b0d19..8fa2bd0 100644 --- a/gacela_FTGL.lisp +++ b/gacela_FTGL.lisp @@ -17,6 +17,16 @@ (in-package :gacela) +(defmacro mapcconst (type c-type name) + (let ((c-header (concatenate 'string c-type " gacela_" name " (void)")) + (c-body (concatenate 'string "return " name ";")) + (c-name (concatenate 'string "gacela_" name)) + (lisp-name (intern (string-upcase name)))) + `(progn + (defcfun ,c-header 0 ,c-body) + (defentry ,lisp-name () (,type ,c-name)) + (eval-when (load) (defconstant ,lisp-name (,lisp-name)))))) + (clines "#include ") (mapcconst int "int" "ft_encoding_unicode")