/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <regex.h>
size_t  regerror(int errcode, const regex_t *preg, char *errbuf,
                              size_t errbuf_size) {
    void *fptr;
    size_t retval;
    
    fptr = dlsym(_ChRegex_handle, "regerror_chdl");
    if(fptr == NULL) { 
        printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
        return NULL;
    }
    dlrunfun(fptr, &retval, regerror, errcode, preg, errbuf, errbuf_size);
    return retval;
}
