From info at jensteich.de Sun Dec 22 11:49:28 2013 From: info at jensteich.de (Jens Teich) Date: Sun, 22 Dec 2013 12:49:28 +0100 Subject: Fwd: Re: Bug in RegExPlugin In-Reply-To: <52B6CF53.4020801@jensteich.de> References: <52B6CF53.4020801@jensteich.de> Message-ID: <52B6D1C8.3050105@jensteich.de> -------- Original-Nachricht -------- Betreff: Re: Bug in RegExPlugin Datum: Sun, 22 Dec 2013 12:38:59 +0100 Von: Jens Teich An: Russell Watson , FM-Lisp+help at 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 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 > @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 ="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. ;-) From info at jensteich.de Mon Dec 23 09:08:08 2013 From: info at jensteich.de (Jens Teich) Date: Mon, 23 Dec 2013 10:08:08 +0100 Subject: RegEx Plugin 0.2.5 Message-ID: <52B7FD78.8070002@jensteich.de> New version for Mac: http://jensteich.de/wp-content/regex-plugin/RegexPlugIn.0.2.5.zip. Fixing an error with wrong characters in plugin name reported by Russell Watson. Jens From info at jensteich.de Mon Dec 23 08:19:10 2013 From: info at jensteich.de (Jens Teich) Date: Mon, 23 Dec 2013 09:19:10 +0100 Subject: Bug in RegExPlugin In-Reply-To: References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> <52B73E29.8080409@jensteich.de> <52B75AF5.2090801@jensteich.de> Message-ID: <52B7F1FE.1010404@jensteich.de> diff: +----------------------------------------------------------------+ diff -u /Users/jens_/Lisp/fm-plugin-tools/main.lisp\~ /Users/jens_/Lisp/fm-plugin-tools/main.lisp --- /Users/jens_/Lisp/fm-plugin-tools/main.lisp~ 2012-11-24 23:03:18.000000000 +0100 +++ /Users/jens_/Lisp/fm-plugin-tools/main.lisp 2013-12-23 08:50:03.000000000 +0100 @@ -46,7 +46,7 @@ (with-quadchar (plugin-id *plugin-id*) (fm-expr-env-un-register-external-function plugin-id function-id))) -(defun handle-get-string-message (which-string result-size result-ptr) +(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 @@ -66,8 +66,7 @@ :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)))) + do (setf (dereference ptr :index index) (char-code char))))) (defun register-plugin-functions () "Loops through *PLUGIN-FUNCTIONS* and registers with FileMaker Diff finished. Mon Dec 23 08:53:17 2013 +----------------------------------------------------------------+ Am 22.12.13 22:58, schrieb Edi Weitz: > Strange. > > 1. If it works without the FINALLY clause, how does FM know where the > string ends? > > 2. ^A is ASCII(1), isn't it? But we write ASCII(0) there... don't know, but it works > On Sun, Dec 22, 2013 at 10:34 PM, Jens Teich wrote: >>> 200 times ^A which gave me the clue for the correct solution: no finally >>> clause at all! >> >> Thanks Edi >> >> Am 22.12.13 21:45, schrieb Edi Weitz: >> >>> Thanks. What happens if you do this instead? >>> >>> (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 (loop for i from index to (1- result-size) >>> do (setf (dereference ptr :index i) #\Null))) >>> >>> (Can't test myself. I don't have a machine with FM on it anymore.) >>> >>> >>> >>> On Sun, Dec 22, 2013 at 8:31 PM, Jens Teich wrote: >>>> >>>> result-size is 256 always. >>>> >>>> Am 22.12.13 13:40, schrieb Edi Weitz: >>>> >>>>> @Jens: At first sight, the code looks right to me - or I'm not seeing >>>>> the forest for the trees. It could be that FileMaker (maybe only in a >>>>> specific version or maybe only on the Mac?) ignores the terminating >>>>> NUL character at the end of the string and expects us to fill the >>>>> whole buffer? (Do you happen to know or can you figure out the value >>>>> of RESULT-SIZE when the function is called? >>>>> >>>>> @Russell: We're not as dumb as you might think. The mailing list >>>>> information used to be correct and will be correct again. We're just >>>>> having a transition phase in which some things are out of sync due to >>>>> problems with the guy who maintained the common-lisp.net servers. >>>>> >>>>> Cheers, >>>>> Edi. >>>>> >>>>> >>>>> >>>>> On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -------- Original-Nachricht -------- >>>>>> Betreff: Re: Bug in RegExPlugin >>>>>> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >>>>>> Von: Jens Teich >>>>>> An: Russell Watson , FM-Lisp+help at 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 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 >>>>>>> @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 ="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. ;-) >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >> > > From edi at agharta.de Mon Dec 23 21:25:27 2013 From: edi at agharta.de (Edi Weitz) Date: Mon, 23 Dec 2013 22:25:27 +0100 Subject: Bug in RegExPlugin In-Reply-To: <52B7F1FE.1010404@jensteich.de> References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> <52B73E29.8080409@jensteich.de> <52B75AF5.2090801@jensteich.de> <52B7F1FE.1010404@jensteich.de> Message-ID: I must have missed a couple of releases. The source code on my website is still 0.2.1. Can you send me the full source tarball? Thanks, Edi. On Mon, Dec 23, 2013 at 9:19 AM, Jens Teich wrote: > diff: > > +----------------------------------------------------------------+ > diff -u /Users/jens_/Lisp/fm-plugin-tools/main.lisp\~ > /Users/jens_/Lisp/fm-plugin-tools/main.lisp > --- /Users/jens_/Lisp/fm-plugin-tools/main.lisp~ 2012-11-24 > 23:03:18.000000000 +0100 > +++ /Users/jens_/Lisp/fm-plugin-tools/main.lisp 2013-12-23 > 08:50:03.000000000 +0100 > @@ -46,7 +46,7 @@ > (with-quadchar (plugin-id *plugin-id*) > (fm-expr-env-un-register-external-function plugin-id function-id))) > > -(defun handle-get-string-message (which-string result-size result-ptr) > +(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 > @@ -66,8 +66,7 @@ > > :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)))) > + do (setf (dereference ptr :index index) (char-code char))))) > > (defun register-plugin-functions () > "Loops through *PLUGIN-FUNCTIONS* and registers with FileMaker > > Diff finished. Mon Dec 23 08:53:17 2013 > +----------------------------------------------------------------+ > > > Am 22.12.13 22:58, schrieb Edi Weitz: > >> Strange. >> >> 1. If it works without the FINALLY clause, how does FM know where the >> string ends? >> >> 2. ^A is ASCII(1), isn't it? But we write ASCII(0) there... > > > don't know, but it works > > >> On Sun, Dec 22, 2013 at 10:34 PM, Jens Teich wrote: >>>> >>>> 200 times ^A which gave me the clue for the correct solution: no finally >>>> clause at all! >>> >>> >>> Thanks Edi >>> >>> Am 22.12.13 21:45, schrieb Edi Weitz: >>> >>>> Thanks. What happens if you do this instead? >>>> >>>> (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 (loop for i from index to (1- result-size) >>>> do (setf (dereference ptr :index i) #\Null))) >>>> >>>> (Can't test myself. I don't have a machine with FM on it anymore.) >>>> >>>> >>>> >>>> On Sun, Dec 22, 2013 at 8:31 PM, Jens Teich wrote: >>>>> >>>>> >>>>> result-size is 256 always. >>>>> >>>>> Am 22.12.13 13:40, schrieb Edi Weitz: >>>>> >>>>>> @Jens: At first sight, the code looks right to me - or I'm not seeing >>>>>> the forest for the trees. It could be that FileMaker (maybe only in a >>>>>> specific version or maybe only on the Mac?) ignores the terminating >>>>>> NUL character at the end of the string and expects us to fill the >>>>>> whole buffer? (Do you happen to know or can you figure out the value >>>>>> of RESULT-SIZE when the function is called? >>>>>> >>>>>> @Russell: We're not as dumb as you might think. The mailing list >>>>>> information used to be correct and will be correct again. We're just >>>>>> having a transition phase in which some things are out of sync due to >>>>>> problems with the guy who maintained the common-lisp.net servers. >>>>>> >>>>>> Cheers, >>>>>> Edi. >>>>>> >>>>>> >>>>>> >>>>>> On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -------- Original-Nachricht -------- >>>>>>> Betreff: Re: Bug in RegExPlugin >>>>>>> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >>>>>>> Von: Jens Teich >>>>>>> An: Russell Watson , >>>>>>> FM-Lisp+help at 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 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 >>>>>>>> @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 ="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. ;-) >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> >> > From info at jensteich.de Sun Dec 22 19:31:53 2013 From: info at jensteich.de (Jens Teich) Date: Sun, 22 Dec 2013 20:31:53 +0100 Subject: Bug in RegExPlugin In-Reply-To: References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> Message-ID: <52B73E29.8080409@jensteich.de> result-size is 256 always. Am 22.12.13 13:40, schrieb Edi Weitz: > @Jens: At first sight, the code looks right to me - or I'm not seeing > the forest for the trees. It could be that FileMaker (maybe only in a > specific version or maybe only on the Mac?) ignores the terminating > NUL character at the end of the string and expects us to fill the > whole buffer? (Do you happen to know or can you figure out the value > of RESULT-SIZE when the function is called? > > @Russell: We're not as dumb as you might think. The mailing list > information used to be correct and will be correct again. We're just > having a transition phase in which some things are out of sync due to > problems with the guy who maintained the common-lisp.net servers. > > Cheers, > Edi. > > > > On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: >> >> >> >> -------- Original-Nachricht -------- >> Betreff: Re: Bug in RegExPlugin >> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >> Von: Jens Teich >> An: Russell Watson , FM-Lisp+help at 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 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 >>> @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 ="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. ;-) >> >> >> >> >> > > From edi at agharta.de Sun Dec 22 21:58:54 2013 From: edi at agharta.de (Edi Weitz) Date: Sun, 22 Dec 2013 22:58:54 +0100 Subject: Bug in RegExPlugin In-Reply-To: <52B75AF5.2090801@jensteich.de> References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> <52B73E29.8080409@jensteich.de> <52B75AF5.2090801@jensteich.de> Message-ID: Strange. 1. If it works without the FINALLY clause, how does FM know where the string ends? 2. ^A is ASCII(1), isn't it? But we write ASCII(0) there... On Sun, Dec 22, 2013 at 10:34 PM, Jens Teich wrote: >>200 times ^A which gave me the clue for the correct solution: no finally >> clause at all! > > Thanks Edi > > Am 22.12.13 21:45, schrieb Edi Weitz: > >> Thanks. What happens if you do this instead? >> >> (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 (loop for i from index to (1- result-size) >> do (setf (dereference ptr :index i) #\Null))) >> >> (Can't test myself. I don't have a machine with FM on it anymore.) >> >> >> >> On Sun, Dec 22, 2013 at 8:31 PM, Jens Teich wrote: >>> >>> result-size is 256 always. >>> >>> Am 22.12.13 13:40, schrieb Edi Weitz: >>> >>>> @Jens: At first sight, the code looks right to me - or I'm not seeing >>>> the forest for the trees. It could be that FileMaker (maybe only in a >>>> specific version or maybe only on the Mac?) ignores the terminating >>>> NUL character at the end of the string and expects us to fill the >>>> whole buffer? (Do you happen to know or can you figure out the value >>>> of RESULT-SIZE when the function is called? >>>> >>>> @Russell: We're not as dumb as you might think. The mailing list >>>> information used to be correct and will be correct again. We're just >>>> having a transition phase in which some things are out of sync due to >>>> problems with the guy who maintained the common-lisp.net servers. >>>> >>>> Cheers, >>>> Edi. >>>> >>>> >>>> >>>> On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -------- Original-Nachricht -------- >>>>> Betreff: Re: Bug in RegExPlugin >>>>> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >>>>> Von: Jens Teich >>>>> An: Russell Watson , FM-Lisp+help at 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 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 >>>>>> @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 ="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. ;-) >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >> > From info at jensteich.de Sun Dec 22 21:34:45 2013 From: info at jensteich.de (Jens Teich) Date: Sun, 22 Dec 2013 22:34:45 +0100 Subject: Bug in RegExPlugin In-Reply-To: References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> <52B73E29.8080409@jensteich.de> Message-ID: <52B75AF5.2090801@jensteich.de> >200 times ^A which gave me the clue for the correct solution: no finally clause at all! Thanks Edi Am 22.12.13 21:45, schrieb Edi Weitz: > Thanks. What happens if you do this instead? > > (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 (loop for i from index to (1- result-size) > do (setf (dereference ptr :index i) #\Null))) > > (Can't test myself. I don't have a machine with FM on it anymore.) > > > > On Sun, Dec 22, 2013 at 8:31 PM, Jens Teich wrote: >> result-size is 256 always. >> >> Am 22.12.13 13:40, schrieb Edi Weitz: >> >>> @Jens: At first sight, the code looks right to me - or I'm not seeing >>> the forest for the trees. It could be that FileMaker (maybe only in a >>> specific version or maybe only on the Mac?) ignores the terminating >>> NUL character at the end of the string and expects us to fill the >>> whole buffer? (Do you happen to know or can you figure out the value >>> of RESULT-SIZE when the function is called? >>> >>> @Russell: We're not as dumb as you might think. The mailing list >>> information used to be correct and will be correct again. We're just >>> having a transition phase in which some things are out of sync due to >>> problems with the guy who maintained the common-lisp.net servers. >>> >>> Cheers, >>> Edi. >>> >>> >>> >>> On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: >>>> >>>> >>>> >>>> >>>> -------- Original-Nachricht -------- >>>> Betreff: Re: Bug in RegExPlugin >>>> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >>>> Von: Jens Teich >>>> An: Russell Watson , FM-Lisp+help at 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 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 >>>>> @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 ="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. ;-) >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> > From edi at agharta.de Sun Dec 22 20:45:56 2013 From: edi at agharta.de (Edi Weitz) Date: Sun, 22 Dec 2013 21:45:56 +0100 Subject: Bug in RegExPlugin In-Reply-To: <52B73E29.8080409@jensteich.de> References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> <52B73E29.8080409@jensteich.de> Message-ID: Thanks. What happens if you do this instead? (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 (loop for i from index to (1- result-size) do (setf (dereference ptr :index i) #\Null))) (Can't test myself. I don't have a machine with FM on it anymore.) On Sun, Dec 22, 2013 at 8:31 PM, Jens Teich wrote: > result-size is 256 always. > > Am 22.12.13 13:40, schrieb Edi Weitz: > >> @Jens: At first sight, the code looks right to me - or I'm not seeing >> the forest for the trees. It could be that FileMaker (maybe only in a >> specific version or maybe only on the Mac?) ignores the terminating >> NUL character at the end of the string and expects us to fill the >> whole buffer? (Do you happen to know or can you figure out the value >> of RESULT-SIZE when the function is called? >> >> @Russell: We're not as dumb as you might think. The mailing list >> information used to be correct and will be correct again. We're just >> having a transition phase in which some things are out of sync due to >> problems with the guy who maintained the common-lisp.net servers. >> >> Cheers, >> Edi. >> >> >> >> On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: >>> >>> >>> >>> >>> -------- Original-Nachricht -------- >>> Betreff: Re: Bug in RegExPlugin >>> Datum: Sun, 22 Dec 2013 12:38:59 +0100 >>> Von: Jens Teich >>> An: Russell Watson , FM-Lisp+help at 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 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 >>>> @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 ="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. ;-) >>> >>> >>> >>> >>> >>> >> >> > From edi at agharta.de Sun Dec 22 12:40:37 2013 From: edi at agharta.de (Edi Weitz) Date: Sun, 22 Dec 2013 13:40:37 +0100 Subject: Bug in RegExPlugin In-Reply-To: <52B6D1C8.3050105@jensteich.de> References: <52B6CF53.4020801@jensteich.de> <52B6D1C8.3050105@jensteich.de> Message-ID: @Jens: At first sight, the code looks right to me - or I'm not seeing the forest for the trees. It could be that FileMaker (maybe only in a specific version or maybe only on the Mac?) ignores the terminating NUL character at the end of the string and expects us to fill the whole buffer? (Do you happen to know or can you figure out the value of RESULT-SIZE when the function is called? @Russell: We're not as dumb as you might think. The mailing list information used to be correct and will be correct again. We're just having a transition phase in which some things are out of sync due to problems with the guy who maintained the common-lisp.net servers. Cheers, Edi. On Sun, Dec 22, 2013 at 12:49 PM, Jens Teich wrote: > > > > -------- Original-Nachricht -------- > Betreff: Re: Bug in RegExPlugin > Datum: Sun, 22 Dec 2013 12:38:59 +0100 > Von: Jens Teich > An: Russell Watson , FM-Lisp+help at 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 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 >> @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 ="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. ;-) > > > > >