-------- Original-Nachricht --------
Betreff: Re: Bug in RegExPlugin
Datum: Sun, 22 Dec 2013 12:38:59 +0100
Von: Jens Teich <info(a)jensteich.de>
An: Russell Watson <russell(a)mrwatson.de>, FM-Lisp+help(a)common-lisp.net
Hi Russel,
thanks for the bug report. This is a tough one (for me). The source of
the problem seems to be here:
(Defun handle-get-string-message (which-string result-size result-ptr)
"Handles `kFMXT_GetString' messages from FileMaker.
WHICH-STRING is the ID for the information FileMaker wants to
have, RESULT-PTR is where the answer string is supposed to be
stored, and RESULT-SIZE is the maximal size of the result."
(when-let (string (case which-string
(#.+k-fmxt-name-str+ *plugin-name*)
(#.+k-fmxt-app-config-str+ *plugin-help-text*)
(#.+k-fmxt-options-str+ (create-options-string))))
#+:win32
(convert-to-foreign-string string
:limit (1- result-size)
:external-format :unicode
:into (make-pointer :address result-ptr
:type :wchar-t))
#-:win32
(loop with ptr = (make-pointer :address result-ptr
:type :unsigned-short)
for index from 0 below (1- result-size)
for char across string
do (setf (dereference ptr :index index) (char-code char))
finally (setf (dereference ptr :index index) #\Null))))
;; from fm-plugin-tools, file main.lisp
The variable *plugin-name* contains the string "RegExPlugin" and is 11
characters long.
On Win the problem does not occur so the problem is in the branch after
#-:win32.
I played a bit with the name of the plugin. When I make it very long,
more unwanted additional characters appear:
RegexPlugIn***********************************************************
**********************************************************************
**********************************************************************
*********************************************ï¿¿ï¿¿ç¯Í¨e;0.2.4;Disabled
Maybe the author of this code (Edi Weitz) reads this and can help or I
will ask for help on the LispWorks mailing list.
~Jens
ps Russel: why do you use this old version of the plugin? I improved the
plugin in the current version according to your input at the FileMaker
Stammtisch some time ago. The RegP-Positions Function has two additional
parameters now:
Positions ( regex ; target {; flags ; pairInnerDelimiter ;
pairOuterDelimiter } )
Am 19.12.13 22:01, schrieb Russell Watson:
> Hallo Jens / Lisp-developers / RegEx Plugin Entwickler,
>
> ----------------------------------------
> OK - so this is the message in german:
>
> ich habe bemerkt, dass unter fm12 liefert das RegExPlugin bei der Get(
> InstalledPlugins ) Funktion das folgende zurück
>
> ^
> Der kleine Diamant am ende vom Pluginname scheint eine ASCII( 1 ) zu
> sein. Ich nehme an, dass das einen Fehler ist und es in dieser Stelle
> keine ASCII(1) sein soll.
>
> GrüÃe
>
> Russell Watson (aka MrWatson)
>
>
> ----------------------------------------
> and here again in case you guys only speak english:
>
> Hi,
>
> I use the RegExp FileMaker Plugin, that is available from Jens Teichs
> website under the URL
> http://jensteich.de/wp-content/regex-plugin/RegexPlugIn.zip.
>
> I noticed today, that the plugin returns an ASCII(1) character (the
> little diamond in the picture) in its reply to the FileMaker Get(
> InstalledPlugins ) function.
>
> That I presume is a bug and an undesired character in the plugins string.
>
> ----------------------------------------
> An (important) aside:
>
> It is not explicitly clear from the combination of Jens Teichs website
> and the linked Common Lisp "mailing list Informartion" page
> (http://common-lisp.net/cgi-bin/mailman/listinfo/fm-lisp)
>
> 1) if this is the correct email adress that I am writing to
> 2) what the <listname> is of the mailing list for the RegExp plugin - is
> it RegExp? is it FM-List*? is it something else?
> 3) which is the correct form of the emailadress: it is mentioned on
> thesss page if it is possible to just write to
> <listname>@common-lisp.net <http://common-lisp.net>
>
>
> I hope that all helps.
>
> Thanks for the Plugin.
>
> Russell Watson (aka MrWatson)
>
>
> * ...I have just noticed that fm-list is in the url, which PROBABLY
> means that <listname>="fm-list" ... but it needs to be EXPLICIT in at
> least one of the pages ... otherwise you're only going to get emails
> from real nerds. ;-)
I want to use
(require "comm")
(comm:ensure-ssl)
in a FileMaker plugin built with fm-plugin-tools.
In the listener it is no problem and even when using the hello-world
delivery example from LW these two lines work without setting any
openssl paths.
I am working both on MacOSX 10.8 and Win7 with LW 6.1.
I posted this already on Lispworks list
(http://article.gmane.org/gmane.lisp.lispworks.general/12755) and got a
bunch of hints but was not able yet to make it work in a FM plugin. When
I try it, I get either an error ('unable to load library') or an
outdated version of openssl loaded.
So obviously fm-plugin-tools is changing something that makes the ssl
library unusable. Any hints are welcome which help me out of this.
Thanks
Jens