[ET Trac] [Einstein Toolkit] #937: CCTK_RegexMatch does not return a distinguishable error condition when the regular expression is invalid
    Einstein Toolkit 
    trac-noreply at einsteintoolkit.org
       
    Tue May 29 18:20:13 CDT 2012
    
    
  
#937: CCTK_RegexMatch does not return a distinguishable error condition when the
regular expression is invalid
--------------------+-------------------------------------------------------
 Reporter:  rhaas   |       Owner:     
     Type:  defect  |      Status:  new
 Priority:  minor   |   Milestone:     
Component:  Cactus  |     Version:     
 Keywords:          |  
--------------------+-------------------------------------------------------
 CCTK_RegexMatch right now returns 1 if the pattern matches the string and
 0 if either the pattern does not match or could not be compiled via
 regcomp. It would be useful if user code could distinguish between these
 two cases. The attached patch changes the return value in the "does not
 compile" case to -1 and updates all source files that I could find that
 use it.
 Note that this patch changes behaviour of a routine. It used to return 0
 for non-compiling patterns so thorns that test for C-like true would
 interpret invalid  patterns as does-not-match, but will interpret the -1
 return value as does-match.
-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/937>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
    
    
More information about the Trac
mailing list