g.g - 2005-07-30

what did I do wrong? I got a couple of cryptic erro messages:
mingw32.... ***[ getMatched Posn.o]Error 1
Abort!

My c function file for getMatched .c is

include <sys/types.h>

include <stdio.h>

include <string.h>

include <ctype.h>

include <limits.h>

include <stdlib.h>

//#include <regex.h>

include "regex.h"

include "utils.h"

include "regex2.h"

//#include "cclass.h"
//#include "cname.h"

long getMatchedPosn(const char sPattern, const char sIn, long ai_regcmp_optn, long lfound_Count, long ll_beg[], long ll_len[])
/

char sPattern
char
sIn
long lfound_Count, long ll_beg[], long ll_len[]
/
{
str_regex_t lstr_regex_t
str_regmatch_t lstr_regmatch_t[]

long ll_rc_regcmp
as_errmsg = &quot;&quot;

long ll_regcmp_optn
ll_regcmp_optn = ai_regcmp_optn

ll_rc_regcmp = regcomp(lstr_regex_t, sIn, ll_regcmp_optn)

if ll_rc_regcmp &gt; 0 then 
    as_errmsg = get_regmsg(ll_rc_regcmp, lstr_regex_t)
    regfree(lstr_regex_t) 
    return ll_rc_regcmp
End If



long li_rcregexec
long ll_nmatch
long li_eflags

if ai_regexec_optn &lt; 0 then  li_eflags = 0
li_rcregexec = regexec(lstr_regex_t, as_in2match, ll_nmatch,  lstr_regmatch[] , li_eflags)
lfound_Count = ll_nmatch

if li_rcregexec &gt; 0 then
    as_errmsg = get_regmsg(li_rcregexec, lstr_regex_t)
    regfree(lstr_regex_t) 
    return li_rcregexec
End If

if ll_nmatch &gt; 0 then
    ulong l
    long ll_beg, ll_len
    for l = 0 to (ll_nmatch -1)
        ll_beg[l] = lstr_regmatch[l].start_of_match
        ll_len[l] = lstr_regmatch[l].end_of_match - ll_beg +1
//      as_matchedstring[l] = Mid(as_in2match, ll_beg, ll_len)
    next
End If


return 0

}

Pardon me I probaly got soem coding wrong, I am not a c programmer. I just want to warp a dll so my other application can use the dll wihtout worrying about stack pointer problem