cffi:defcstruct, cffi:foreign-string-to-lisp question
2008-12-17 14:45:12 GMT
I don`t know if this is the right group to ask, but I would appreciate some help with the following.
The aim is to read a binary file from lisp.
The file contains a set of records, every record consists of the following data:
(name :char :count 32) ;; this is the problematic line 1
(alias :char :count 12) ;; this is the problematic line 2
Now the problematic line 1 should read 32 characters from an ascii-encoded file.
For that, I use the (defun test .....) (see below). The test converts the cstruct with-foreign-slots through (cffi:foreign-string-to-lisp name).
The output of (test) is:
(1 "ABC ABC
_______________________________________________ cffi-devel mailing list cffi-devel <at> common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel