djb@stoney.mitre.org (David J. Braunegg) (12/01/90)
In AKCL, has anyone managed to get a C function to return a string
that LIsp can use?
I tried the following, but get this error when I evaluate (test)
Error: NIL is not a VECTOR
Error signalled by TEST
the code is
(in-package 'user)
(Clines
"#include <syscall.h>
typedef char *StrinG;
extern char name[64];
StrinG hostname()
{
gethostname(name, 64);
return(name);
}")
(defentry test () (StrinG hostname))
Thanks,
Dave