Hi Henrik,

> Worked, thanks!
> So I'm now using this line: gcc -o main.so -m64 -std=gnu99 -fPIC
> -shared -export-dynamic main.c -lm -lpcre

OK, thanks.

I haven't scrutinized it in detail, just a minor hint:

>          (while
>             (let? R (line T)
>                (link R)) ) ) ) )

The 'let?' is not really needed, you could write

   (while (line T)
      (link @) )

> I noted that ^ needs to be escaped otherwise the regex string won't be
> OK on the C side. Are there any other characters which needs the same
> treatment?

The backslash (\), the hat (^), and the double quote (") need to be
escaped. And all characters smaller than a blank (ASCII 1 through 31)
should be written as ^X (that's why the hat needs to be escaped).

BTW, if I'm not sure if a string is really what it looks like, I always
do something like

   : (mapcar char (chop "a^B\"c"))
   -> (97 2 34 99)

to show the individual ASCII characters.

- Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to