--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
> > Will you give pcre dll a try?
>
> Its easy and won't have the same issues, but is what Sean did good
> enough?
As a matter of fact, it's far from enough.
Native PCRE API's provides lots of useful facilities, and I already
made a wrapper yesterday, however, I felt rather awkward to explain
all of the arguments so I didn't upload it. If anyone is interested,
here they are:
----------------------------------------------------------------------
Function get_stringnumber(pCode,sName)
local nNumber=dll.call("Cdecl|pcre|pcre_get_stringnumber|ui s+";;+
,pCode,"sName")
quit(nNumber)
Function get_stringtable_entries(pCode,sName,pFirst,pLast)
dll.call("Cdecl|pcre|pcre_get_stringtable_entries|ui s+ ui ui";;+
,pCode,"sName",pFirst,pLast)
Function
copy_named_substring(pCode,pSubject,pOffsets,nCount,sName,pBuff,nSize)
dll.call("Cdecl|pcre|pcre_copy_named_substring|ui ui ui i s+ ui i";;+
,pCode,pSubject,pOffsets,nCount,"sName",pBuff,nSize)
Function copy_substring(pSubject,pOffsets,nCount,nNumber,pBuff,nSize)
dll.call("Cdecl|pcre|pcre_copy_substring|ui ui i i ui i";;+
,pSubject,pOffsets,nCount,nNumber,pBuff,nSize)
Function get_named_substring(pCode,pSubject,pOffsets,nCount,sName,pStr)
dll.call("Cdecl|pcre|pcre_get_named_substring|ui ui ui i s+ ui*";;+
,pCode,pSubject,pOffsets,nCount,"sName","pStr")
quit(pStr)
Function get_substring(pSubject,pOffsets,nCount,nNumber,pStr)
dll.call("Cdecl|pcre|pcre_get_substring|ui ui i i ui*";;+
,pSubject,pOffsets,nCount,nNumber,"pStr")
quit(pStr)
Function get_substring_list(pSubject,pOffsets,nCount,pLst)
dll.call("Cdecl|pcre|pcre_get_substring_list|ui ui i ui*";;+
,pSubject,pOffsets,nCount,"pLst")
quit(pLst)
Function free_substring(pStr)
dll.call("Cdecl|pcre|pcre_free_substring|ui",pStr)
Function free_substring_list(pLst)
dll.call("Cdecl|pcre|pcre_free_substring_list|ui",pLst)
Function fullinfo(pCode,pExtra,nWhat,pWhere)
dll.call("Cdecl|pcre|pcre_fullinfo|ui ui i ui";;+
,pCode,pExtra,nWhat,pWhere)
Function refcount(pCode,nAdjust)
dll.call("Cdecl|pcre|pcre_refcount|ui i",pCode,nAdjust)
Function config(nWhat,pWhere)
dll.call("Cdecl|pcre|pcre_config|i ui",nWhat,pWhere)
Function study(pCode,nOptions,ppError)
local pExtra=dll.call("Cdecl|pcre|pcre_study|ui i ui";;+
,pCode,nOptions,ppError)
quit(pExtra)
Function maketables()
local pTable=dll.call("Cdecl|pcre|pcre_maketables|")
quit(pTable)
Function version(sVer)
dll.call("Cdecl|wsprintf|s+ s- ui";;+
,"sVer","%s",dll.call("Cdecl|pcre|pcre_version|"))
quit(sVer)
-----------------------------------------------------------------------
Sean