Changeset c36f4d0 for regex.c


Ignore:
Timestamp:
Jul 23, 2011, 9:24:37 PM (13 years ago)
Author:
GitHub Merge Button <merge-button@github.com>
Parents:
4ebbfbc (diff), c40d11a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge c40d11a3d527920acd6063b93f1de30d1f668c96 into 4ebbfbc5360fa004637dd101f5a0c833cdccd60a
File:
1 edited

Legend:

Unmodified
Added
Removed
  • regex.c

    rd427f08 rc40d11a  
    1111{
    1212  int ret;
    13   char buff1[LINE];
     13  size_t errbuf_size;
     14  char *errbuf;
    1415  const char *ptr;
    1516 
     
    2627  ret=regcomp(&(re->re), ptr, REG_EXTENDED|REG_ICASE);
    2728  if (ret) {
    28     regerror(ret, NULL, buff1, LINE);
    29     owl_function_makemsg("Error in regular expression: %s", buff1);
     29    errbuf_size = regerror(ret, NULL, NULL, 0);
     30    errbuf = g_new(char, errbuf_size);
     31    regerror(ret, NULL, errbuf, errbuf_size);
     32    owl_function_error("Error in regular expression: %s", errbuf);
     33    g_free(errbuf);
    3034    g_free(re->string);
    3135    re->string=NULL;
Note: See TracChangeset for help on using the changeset viewer.